修改MYSQL密码

UPDATE mysql.user SET password=PASSWORD(‘1’) WHERE User=‘root’;

查询用户表重要字段

select Host,User,Password from mysql.user;

更新Host为其他机器都能访问

update mysql.user set Host=‘%’ where Host=‘127.0.0.1’;
update mysql.user set Host=‘%’ where Host=‘localhost’;

刷新MYSQL配置

flush privileges;

添加防火墙允许的端口

-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT

重启防火墙

service iptables restart

开始连接(现在就可以在其他机器上连接服务端MySql了)