关于mysql不能登录问题的收集
服务器mysql不能远程登录了?一一排查如下:
1. 开启ssh密码认证,
2. 登录服务器查看mysql服务状态(服务名 mysql),确定服务正常启动
服务可选参数 service {serviceName} {start|stop|reload|restart|condrestart|status|panic|save}
service mysql status
3. 本地登录,验证 服务是否正常
4. 查看表 mysql.user中对于用户记录的`Host`字段,是否值为%
select `Host`, 'User' from mysql.user where `User` = '{username}'
5. 查看配置文件, 一般在 /etc/my.cnf
5.1 skip-networking
5.2 bind-address 配置mysql响应的请求对象
6. 被防火墙拦截了
6.1 暴力点的方式,直接关闭防火墙
先查看服务状态 service iptables status
关闭服务 service iptables stop
6.2 清理
iptables -F #-F清空所选的链,重启后恢复
7. 收集:
[Mysql 局域网no route to host 解决 ](http://blog.csdn.net/sunnydogzhou/article/details/6826908)
[ERROR 2003 (HY000): Can't connect to MySQL server (111)](http://stackoverflow.com/questions/11758339/error-2003-hy000-cant-connect-to-mysql-server-111)
[ERROR 2003 (HY000): Can't connect to MySQL server ](http://blog.csdn.net/longxibendi/article/details/6363934)
[iptables防火墙配置详解](http://www.liusuping.com/ubuntu-linux/iptables-firewall-setting.html)
[CentOS下配置iptables防火墙](http://os.51cto.com/art/201103/249398.htm)
浙公网安备 33010602011771号