Sometimes, MySQL throws an error like this:
Host ‘…’ is blocked because of many connection errors
Unblock with ‘mysqladmin flush-hosts’
This typically means that MySQL has blocked a host after too many connection errors. The usual fix is to run:
mysqladmin flush-hosts
or
mysql> FLUSH HOSTS; /* deprecated since 8.0.23; invalid in 8.4 */
mysql> TRUNCATE TABLE performance_schema.host_cache; /* recommended since 5.6.5 */
A host is blocked, because of many connection errors,
specifically more connection errors than
max_connect_errors.
So
- what counts as a connection error?
- what is counted per what?
- and how is the error count cleared?
…
[Read more]