1. mysql配置文件/etc/my.cnf中若有字段bind-address=127.0.0.0, 则改为bind-address=0.0.0.0
2. 修改用户的host字段, host默认是localhost, 限制在本地登录. 例如登录用户为root. update user set host = '%' where user = 'root';
3. 服务器开启3306端口, 便于远程客户端访问.
1. mysql配置文件/etc/my.cnf中若有字段bind-address=127.0.0.0, 则改为bind-address=0.0.0.0
2. 修改用户的host字段, host默认是localhost, 限制在本地登录. 例如登录用户为root. update user set host = '%' where user = 'root';
3. 服务器开启3306端口, 便于远程客户端访问.