Mysql Error: Host ‘xxx.xxx.xxx.xxx’ is not allowed to connect to

1.打开cmd控制台

2.

  mysql -u root -p

  输入密码

3.

  mysql>grant all privileges on *.* to 'root' @'%' identified by '123' with grant option;

  mysql>flush privileges;

其中 '123' 是 'root' 的密码。再有命令结尾分号 ";" 别写丢了。

原文地址:https://www.cnblogs.com/SZxiaochun/p/5921100.html