[Solved] MySql Error: unblock with ‘mysqladmin flush-hosts

Information troubleshooting

# Check the maximum number of connection errors
show global variables like 'max_connect_errors';

# Check the connection IP
select * from performance_schema.host_cache

 # Flush the database IP cache 
flush hosts


 # View connections
SELECT substring_index(host, ':',1) AS host_name, state, count(*) FROM information_schema.processlist GROUP BY state, host_name;

Solution: enter the database and use the admin permission account

1. Set the value of the variable max_connection_errors to a larger value

set global max_connect_errors=1500;


2. Execute the command to use flush hosts


3、Change the value of the system variable so that MySQL server does not record host cache information (not recommended) e.g. set global host_cache_size=0;

Read More: