MySQL host is blocked because of many connection errors; 报错
surroundings
Operating System: Linux
Database: mysql5.7.27
Error message
jHost '10.146.5.209' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'Connection closed by foreign host.
the reason
Produce much the same ip short period of time (more than the maximum mysql database max_connection_errors of) the database connection interruption caused by blockage;
Solution
The first: increasing the number of allowed max_connect_errors (this method does not completely)
Login Mysql database 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';
The first: to increase the number of allowed max_connect_errors
whereis mysqladmin mysqladmin of the search path
Use the command Modified:
/ Usr / bin / mysqladmin flush-hosts -h host ip -uroot -p
Remarks:
If you are configuring a master and slave are also needed to clean up the backup again
The second step may be performed in a database, the database login command is as follows:
MySQL> the flush the hosts;