gpt4 book ai didi

General error: 1449 The user specified as a definer(常规错误:1449指定为定义者的用户)

转载 作者:bug小助手 更新时间:2023-10-25 18:33:42 34 4
gpt4 key购买 nike



I installed new system (Ubuntu 20.04), I installed LAMP and cloned Laravel project. I created database blog and I wanted to migrate but I have this error.

我安装了新系统(Ubuntu 20.04),我安装了LAMP并克隆了Laravel项目。我创建了数据库博客,我想迁移,但我有这个错误。




SQLSTATE[HY000]: General error: 1449 The user specified as a definer
('mysql.infoschema'@'localhost') does not exist (SQL: select * from
information_schema.tables where table_schema = blog and table_name =
migrations and table_type = 'BASE TABLE')




How can I solve this problem?

我怎么才能解决这个问题呢?


更多回答

Change username to root, and as i expect your root does not have a password, so just set empty password.

将用户名更改为根,正如我所料,您的根没有密码,因此只需设置空密码即可。

优秀答案推荐

Are you running MySQL 8?

您运行的是MySQL8吗?



mysql.infoschema is an account that comes with MySQL. If your system does not have one, make sure you have run mysql_upgrade.

Infoshema是MySQL附带的帐户。如果您的系统没有MySQL_Upgrade,请确保您已经运行了MySQL_Upgrade。



'mysql.infoschema'@'localhost' does not exist. Either it never existed, or it was existed and removed/altered. Log in with root and run the following query:

‘mysql.infoshema’@‘Localhost’不存在。要么它从来不存在,要么它存在并被移除/更改。以超级用户身份登录并运行以下查询:


SELECT user,host FROM mysql.user;

see what lines you find for mysql.infoschema and what hosts are there. It's possible that you are just not specifying the host properly, or the user was renamed, whatever. You might need to (re)create this user.

查看您在mysql.infoshema中找到了哪些行,以及这些行有哪些主机。可能是您没有正确指定主机,或者用户被重命名了,等等。您可能需要(重新)创建此用户。


更多回答

Yes, I have Mysql 8

是的,我有MySQL 8

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com