错误代码是1130,ERROR 1130: Host xxx.xxx.xxx.xxx is not allowed to connect to this MySQL server 是无法给远程连接的用户权限问题
给用户授权
我用的用户是root 密码123456
首选语法为:
Sql代码
// An highlighted block
GRANT ALL PRIVILEGES ON *.* TO 'myuser'@'%' IDENTIFIED BY 'mypassword' WITH GRANT OPTION;
示例:
Sql代码
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY '123456' WITH GRANT OPTION;
执行完后,再
mysql:flush privileges;
刷新一下权限就可以了,不用重启