[mysql] How to unblock with mysqladmin flush hosts

I have gone through similar cases listed here but it doesn't seem to work.

I was using MySQL Workbench to establish a connection with my database which is hosted on another server. Tried a few times and unable to connect followed by this error. I am confused as to where I should even do this flush. On PhpMyadmin under the SQL query? Cos when I tried to input the following command, it returns as syntax error. I am using a windows OS thus no shell shell scripting for me to input this information either. I am accessing the database temporarily via Cpanel/ phpmyadmin now.

Please help to tell where I should input this data and if my syntax is wrong. Thanks for help.

mysqladmin flush-hosts;

or

mysqladmin -umyname -pmypassword flush-hosts;

My error message as follows:

Failed to connect to MYSql at 192...* with user myName

Host 'host-92...*.as13285.net' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

This question is related to mysql mysql-workbench

The answer is


You can easily restart your MySql service. This kicks the error off.


You should put it into command line in windows.

mysqladmin -u [username] -p flush-hosts
**** [MySQL password]

or

mysqladmin flush-hosts -u [username] -p
**** [MySQL password]

For network login use the following command:

mysqladmin -h <RDS ENDPOINT URL> -P <PORT> -u <USER> -p flush-hosts
mysqladmin -h [YOUR RDS END POINT URL] -P 3306 -u [DB USER] -p flush-hosts 

you can permanently solution your problem by editing my.ini file[Mysql configuration file] change variables max_connections = 10000;

or

login into MySQL using command line -

mysql -u [username] -p
**** [MySQL password]

put the below command into MySQL window

SET GLOBAL max_connect_errors=10000;
set global max_connections = 200;

check veritable using command-

show variables like "max_connections";
show variables like "max_connect_errors";