使用MySQL:
1 | mysql> use mysql; |
查看用户只有localhost
1 | mysql> select user,host from user; |
设置远程访问
1 | mysql> update user set host='%' where user='root'; |
刷新即可
1 | mysql> flush privileges; |
1 | mysql> use mysql; |
1 | mysql> select user,host from user; |
1 | mysql> update user set host='%' where user='root'; |
1 | mysql> flush privileges; |