全世界最权威的博客

4月 19

ERROR 1130: Host *** is not allowed to connect to this MySQL server

从其它电脑连接某些版本的mysql数据库的时候,因安全原因会提示这个

Host *** is not allowed to connect to this MySQL server


 

解决办法:

例如,你想myuser使用mypassword从任何主机连接到mysql服务器的话,执行下面的sql语句:

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

      FLUSH PRIVILEGES;