Home > Database > Mysql Tutorial > Host ‘XXXXXX’ is blocked because of many connection errors

Host ‘XXXXXX’ is blocked because of many connection errors

WBOY
Release: 2016-06-07 17:51:42
Original
2244 people have browsed it

出现Host ‘XXXXXX’ is blocked because of many connection errors这种错误我们只要在my.ini 修改set global max_connect_errors=1000;后面的1000是连接大小适当就可以了。

ERROR 1129 (00000): Host ‘XXXXXX’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’
这说明mysqld已经得到了大量(max_connect_errors)的主机’hostname’的在中途被中断了的连接请求。在 max_connect_errors次失败请求后,mysqld认为出错了,并且阻止该站点进一步的连接,直到有人执行命令 mysqladmin flush-hosts。
缺省地,mysqld在10个连接错误后阻塞一台主机。你可以通过很容易地调整它:

set global max_connect_errors=1000;

注意,对给定的主机,如果得到这个错误消息,你应该首先检查该主机的TCP/IP连接有没有问题。如果你的TCP/IP连接不在运行,增加max_connect_errors变量的值也不会有帮助!


最后我们记得要重启mysql或 /usr/local/mysql/bin/mysqladmin flush-host -h 192.168.50.1 -uroot 哦,这样就可以解决问题了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template