解决远程连接mysql错误1130代码的方法

命令行登陆
mysql -uroot -p
输入密码后登陆
use mysql;
 
select host,user from user ; 
 
 grant all
on *.*
to root identified by '123456'
with grant option;

flush privileges;
 
搞定!
原文地址:https://www.cnblogs.com/zhangdashao/p/5422076.html