1.终端进入mysql后使用命令
1)use mysql
2) update user set host='%' where user='root' and host='localhost';
2.修改/etc/mysql/my.cnf文件的 bind-address,把127.0.0.1改成0.0.0.0就可以了
1.终端进入mysql后使用命令
1)use mysql
2) update user set host='%' where user='root' and host='localhost';
2.修改/etc/mysql/my.cnf文件的 bind-address,把127.0.0.1改成0.0.0.0就可以了