Host is blocked because of many connection errors in MySQL
By tux • Mar 12th, 2009 • Category: MySQLError:
“Host ‘xxx.xxx.xxx.xxx’ is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’Connection closed by foreign host.”
If you get the above error for a genuine client connection to the MySQL server. You should consider to increase the MySQL variable ‘max_connect_errors’ which is 10 by default.
If you can afford to restart the MySQL server, enter below to your my.cnf and restart the MySQL service.
[mysqld]
max_connect_errors = 1000
If you can’t afford to restart the MySQL server, follow below steps.
In MySQL pormpt,
show variables like ‘%error%’ ;
+——————–+——-+
| Variable_name | Value |
+——————–+——-+
| log_error | |
| max_connect_errors | 10 |
| max_error_count | 64 |
| slave_skip_errors | OFF |
+——————–+——-+
set global max_connect_errors = 1000 ;
show variables like ‘%error%’ ;
+——————–+——-+
| Variable_name | Value |
+——————–+——-+
| log_error | |
| max_connect_errors | 1000 |
| max_error_count | 64 |
| slave_skip_errors | OFF |
+——————–+——-+
That’s it
tux is
Email this author | All posts by tux
