问题: Host "xxx" is blocked because of many connection errors,unblock with 'mysqladmin flush-hosts

 

wrong reason

The same IP produce too much (more than mysql database max_connection_errors maximum) error database connection in a short time and cause of obstruction.

When a client connection to the server timed out (more than connect_timeout), the server will give this record a client error, the error when the number reaches max_connect_errors time, the client will be locked. It is possible to try to set this value based on business bigger.

 

Solution

 1. Increase of the number of allowed max_connect_errors 

  Run the following command (provisional entry into force, after the restart failure)

  set global max_connect_errors=500;

  Or add the following configuration in mysql configuration file (permanent)

  max_connect_errors=500

 

2. Use clear the cache, which would clean out the count

  Into the mysql console, do the flush hosts

  mysql>flush hosts;

  Mysql installation directory or to the use mysqladmin -u root -p flush-hosts command, enter a password, complete clearing cache

 

 

 

 

Reference address

https://www.cnblogs.com/ruiy/p/11187084.html

https://blog.csdn.net/li_li_lin/article/details/72764683

Guess you like

Origin www.cnblogs.com/kiko2014551511/p/11612970.html