Host X is blocked because of many connection errors; unblock with ‘mysqladmin flush-hosts’

For some reason, you might get these error when you execute the MySQL query,

Host 'mickgenie.com' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' in /home/mickgenie/public_html/wow.php on line 25
Unable to connect to mysql server

The quick fix but not permanent solution will be running the command as below,

mysqladmin flush-hosts

To fix the issue permanently, edit the file /etc/my.cnf.

Add the following line to the /etc/my.cnf below [mysqld]

set-variable = max_connect_errors=5000

Then restart the MySQL services.

Published by

Mick Genie

Mick Genie is the founder of MickGenie.com and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.