1.修改Mysql配置文件 /etc/mysql/my.cnf
注释掉 bind-address = 127.0.0.1
2.重启Mysql /etc/init.d/mysql restart
3.root登录用户赋予权限
mysql -uroot -ppassword
GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'yxserver' WITH GRANT OPTION;
FLUSH PRIVILEGES;
4. 在/etc/hosts.allow
增加如下行:
mysqld: ALL