Host is not allowed to connect to this MySQL server 錯誤的處理方法

liulun發表於2015-05-30

1.

mysql>use mysql;

mysql>update user set host = '%' where user = 'root';

mysql>select host, user from user;

2. 

mysql>GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;

mysql>flush privileges;

說明:%是哪個IP地址可以訪問這個MYsql服務,可以換成你想要的IP地址!

相關文章