MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

1、连接服务器: mysql -u root -p

MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

2、查看当前所有数据库:show databases;

MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

3、进入mysql数据库:use mysql;

MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

4、查看mysql数据库中所有的表:show tables;

MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

5、查看user表中的数据:select Host, User from user;

MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

6、修改user表中的Host:update user set Host=’%’ where User=‘root’;

MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

7、最后刷新一下:flush privileges;

MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

8、重新在Navicate中测试一下:

MySQL连接报错:1130 - Host '10.127.109.21' is not allowed to connect to this MySQL server

相关文章: