标签:because service foreign errors closed
环境:centos 6.5,mysql 5.6.19
问题:
在用telnet l0.0.1.120 3306数据库时,报错
kHost ‘l0.0.1.120‘ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts‘Connection closed by foreign host.
原因:是同一IP的connection errors超出默认的最大值了。
解决方法1:
重启mysql服务即可。
解决方法2:
通过命令行进行mysql控制台
flush hosts;。
解决方法3:
修改默认的max_connect_errors连接数(mysql 5.6以上默认是100)
显示默认连接数:show variables like ‘%max_connect_errors%‘;
修改连接数为500:set global max_connect_errors = 500; (基本上同一IP不可能超过500)
flush privileges;
service mysql restart
本文出自 “快乐之鱼” 博客,请务必保留此出处http://01000.blog.51cto.com/2410614/1564528
解决:mysql is blocked because of many connection errors;问题
标签:because service foreign errors closed
原文地址:http://01000.blog.51cto.com/2410614/1564528