From: http://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html
 
 
Environment:Linux, mysql5.5.21
 
Error:Host is blocked because of your connection errors; unblock with 'mysqladmin flush-hosts'
 
Cause:
 
The same IP address causes too many database connections (exceeding the maximum value of the MySQL database max_connection_errors) in a short period of time;
 
Solution:
 
1. Increase the number of max_connection_errors allowed (temporary ):
 
① Go to the MySQL database to view max_connection_errors:Show variables like '% max_connection_errors % ';
 
② Modify max_connection_errors to 1000:
Set global max_connect_errors = 1000;
 
③ Check whether the modification is successful:Show variables like '% max_connection_errors % ';
 
2. UseMysqladmin flush-hostsRun the following command to clear the hosts file:Whereis mysqladmin);
 
① Use the command to modify the Directory:/usr/bin/Mysqladmin flush-hosts-h192.168.1.1-P3308
-Uroot-Prootpwd;
 
Note:
 
You can add and modify the port number, user name, and password as needed;
 
If the Master/Slave database is configured, you must modify both the master database and slave database. (I have suffered this loss. It is easy to get a few command results that have been tossing for a long time );
 
The second step can also be performed in the database. The command is as follows:Flush hosts;