mysql连接错误

报错如下:

ERROR 1129 (HY000): Host '10.0.14.251' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'


根据提示mysqladmin flush-hosts,看来要刷新一下网络连接


执行

flush hosts;


发现没报错了,开心,嘿嘿。


根据提示中的many connection errors,再查看mysql配置max_connect_errors

show global variables like 'max_connect_errors';


保险起见,把这个配置调大

set global max_connect_errors=1024;


如果需要永久生效,记得去修改mysql配置文件。



-------------

最后再回来更新一下,百度了原因,如下:

同一个ip在短时间内产生太多(超过mysql数据库max_connect_errors的最大值)中断的数据库连接而导致的阻塞!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章