MySql Host is blocked because of many connection errors solution to the problem

Error Log:

message from server: "Host '10.250.112.141' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"

the reason:

  Same ip generate too much in a short time (more than the maximum mysql database max_connection_errors of) the database connection interruption caused by blockage;

Solution:

1, increase the number of max_connect_errors allowed (this method is not complete, the latter may also cause abnormal):

  Mysql database into the view max_connect_errors: show variables like 'max_connect_errors';

    Max_connect_errors number of modified 1000: set global max_connect_errors = 1000;

    To see if the amendment is successful: show variables like 'max_connect_errors';

2, using mysqladmin flush-hosts command to clean up the hosts file

  (1) if it is installed on a Linux host, you can find the path to mysqladmin mysqladmin by whereis

  Use the command Modified:

           /usr/bin/mysqladmin flush-hosts -h 10.250.112.141 -uroot -p

  Remarks:

   Equipped with master / slave master from the main library database and make all modifications from the library again

 (2) if it is to be modified in the command-line tool connected to the database software, the following command: the flush the hosts;
        MySQL> the flush the hosts;

Restart the program, view the database connection is working Jiuhaola.

 

Guess you like

Origin www.cnblogs.com/tonyccc/p/11496101.html