且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

MYSQL连接Error (1133): Can’t find any matching row in the user table错误的解决办法

更新时间:2022-06-08 02:20:47

连接mysql数据库报错如下:

Error (1133): Can’t find any matching row in the user table


解决办法:

mysql> grant all on *.* to 'username'@'%' identified by 'password';

mysql> flush privileges;


*.*可以换成你要访问具体哪个数据库和具体哪张表


发生这一错误的原因是在变更了mysql.user表之后,没有使用FLUSH PRIVILEGES命令来更新权限表(grant tables)



本文转自 jvrmusic520  51CTO博客,原文链接:http://blog.51cto.com/linuxtech/1732303