现在的位置: 首页 > 综合 > 正文

Can’t connect to MySQL server on ” (10060)

2013年10月08日 ⁄ 综合 ⁄ 共 415字 ⁄ 字号 评论关闭
远程连接服务器出现以上错误
主要有三个原因:
1、mysql授权表里没有远程机器的权限,及需要在授权表mysql.user添加
grant all privileges on *.* to 'root'@'远程登陆IP' identified by '远程登陆密码'
flush privileges;
2、网络不通,这个就不说了。

3、防火墙禁止3306端口,以iptable为例
vi /etc/sysconfig/iptables
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3306-j ACCEPT  
service iptables restart

ps:  iptables设置
1) 重启后生效
开启: chkconfig iptables on
关闭: chkconfig iptables off

2) 即时生效,重启后失效
开启: service iptables start
关闭: service iptables stop


抱歉!评论已关闭.