1、问题
使用navicate连接mysql的时候,报错:
1130-host ... is not allowed to connect to this MySql server
2、解决办法:
(1)使用mysql -uroot -p进入数据库
(2)显示所有的数据库show databases;
(3)进入到mysql 这个数据库
use mysql
(4) 查看user表的数据
select Host, User from user;
Host和User,分别为localhost ,root
(5)修改user表中的Host数据
update user set Host='%' where User='root';