Symptoms
If you are trying to access databases on your server from a remote system, you might encounter this error in your database client or your terminal session:
Host '10.0.0.1' is blocked because of many connection errors;
unblock with 'mysqladmin flush-hosts'Connection closed by foreign host.
Description
This error is most likely taking place because MySQL will attempt to block connections to clients that had errors connecting to the server. This is done to protect the MySQL server from malformed clients. However, the connections may continue to be present and need to be cleared.
Workaround
To resolve this, you can use the following command:
mysql -e "FLUSH HOSTS;"
More information on what this command does can be found here.
Comments
0 comments
Article is closed for comments.