一般只需要更改两个地方:
-
mysql数据库的user表。
mysql> update user set Host='%' where user='root';
-
mysql的配置文件:
bind-address = 127.0.0.1
#注释掉,或者更改为你允许的ip地址
mysql> update user set Host='%' where user='root';
bind-address = 127.0.0.1
#注释掉,或者更改为你允许的ip地址
转载于:https://my.oschina.net/jishuge/blog/1570089