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.
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.
To resolve this, you can use the following command:
mysql -e "FLUSH HOSTS;"
More information on what this command does can be found here.