blocked because of many connection errors; unblock with 'mysqladmin flush-hosts

Error: Host is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

Reason:

  The same ip generates too many (more than the maximum value of mysql database max_connection_errors) interrupted database connections in a short period of time due to blocking;

solution Method:
1. Increase the number of max_connection_errors allowed (to cure the symptoms but not the root cause):

  ① Enter the Mysql database to view max_connection_errors: show variables like '%max_connection_errors%';

    ② Modify the number of max_connection_errors to 1000: set global max_connect_errors = 1000;

  ③ Check whether the modification is successful : show variables like '%max_connection_errors%';

2. Use the mysqladmin flush-hosts command to clean up the hosts file (I don't know which directory mysqladmin is in, you can use the command to find: whereis mysqladmin);

  ① Use the command to modify the found directory: /usr/bin/mysqladmin flush-hosts -h192.168.1.1 -P3308 -uroot -prootpwd;

  Note:

    The port number, user name and password can be added and modified as needed;

    If the master/slave master-slave database is configured, both the master library and the slave library should be modified again (I just ate the result of several commands that were obviously easy to toss for a long time); the

    second step can also be performed in the database , the command is as follows: flush hosts;


http://www.cnblogs.com/joeylee/p/3545467.html
http://www.cnblogs.com/susuyu/archive/2013/05/28/3104249.html

mysql database execution mysqladmin flush-hosts method
When there are too many connection errors, MySQL will prohibit client connections. There are two solutions at this time:
1. Use the mysqladmin flush-hosts command to clear the cache. The command execution method is as follows:
command line or terminal: mysqladmin   - u root -p   flush-hosts
and then enter the root account password

2. Modify the mysql configuration file, add max_connect_errors=1000 under [mysqld] , and then restart mysql

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326231978&siteId=291194637