How to , and other stuff about linux, photo, php … A linux, photography blog. To remember some linux situation, and fix them quickly.

March 31, 2008

mysqladmin flush-hosts

Filed under: Linux — admin @ 2:23 pm

Host ‘…’ is blocked Error

If you get an error like this:

Host ‘hostname’ is blocked because of many connection errors.
Unblock with ‘mysqladmin flush-hosts’

This means that mysqld has gotten a lot (max_connect_errors) of connect requests from the host ‘hostname’ that have been interrupted in the middle. After max_connect_errors failed requests, mysqld assumes that something is wrong (like an attack from a cracker), and blocks the site from further connections until you execute a mysqladmin flush-hosts command or issue a FLUSH HOSTS statement.

By default, mysqld blocks a host after 10 connection errors. You can easily adjust this by starting the server like this:

shell> mysqld_safe -O max_connect_errors=10000 &

Note that if you get this error message for a given host, you should first check that there isn’t anything wrong with TCP/IP connections from that host. If your TCP/IP connections aren’t working, it won’t do you any good to increase the value of the max_connect_errors variable!

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment

Powered by WordPress