I'm running MySQL on a remote server, and it suddenly started rejecting all connections:
$ mysql -h 192.168.1.10 -u root -p
ERROR 1129 (00000): Host 'web' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
So, I try this flush-hosts
command...
$ mysqladmin flush-hosts -h 192.168.1.10 -u root -p
mysqladmin: connect to server at '192.168.1.10' failed
error: 'Host 'web' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts''
I.e. it's blocking the very un-blocking tool it recommends. Am I doing it wrong, or will I have to resort to ssh/cpanel/physical access?
To start with you really need to determine who and why is making that many connections so you need to connect with ssh anyways to check all the relevant logs (probably in /var/log/mysql/error.log)
If the connections are legitimate you probably need to either increase the
max_connections
directive in /etc/my.cnf or see if you might be able to improve the SQL queries send to the server so that not that many connections are left open.If they are not legitimate you need to harden security for certain.
Since you will be already logged with ssh to check the logs flash the connections from localhost.