首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 其他教程 > 操作系统 >

解决MySql “Host is blocked because of many connection error” 的有关问题

2013-10-18 
解决MySql “Host is blocked because of many connection error” 的问题? ? ? 这些天,连接MySql出现了? ?

解决MySql “Host is blocked because of many connection error” 的问题

? ? ? 这些天,连接MySql出现了

? ? ?Host is blocked because of many connection error” In MySQL的问题,从网上搜索了一些解决方式,现记录如下:

? ? ??Today, I got following MySQL error in a PHP application: Host ‘host_name’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’. It means that mysqld has received many connection requests from the given host. Default max_connect_errors value is 10, that is remote host will be blocked if there is more than 10 connection errors.

To fix, type the following command

# mysqladmin flush-hosts

To avoid this happening again, edit my.cnf

# vi /etc/my.cnf

Add the following line

max_connect_errors=10000

The value of the max_connect_errors system variable determines how many successive interrupted connection requests are permitted. Restart MySQL to reload configuration file

# service mysqld restart

Or, the value ‘max_connect_errors’ can also be set at runtime, type the following commands

# mysql -uroot -p# mysql> SET GLOBAL max_connect_errors=10000;

热点排行