A web site running on PHP & MySQL gives this message:
Warning: mysql_connect(): Host 'localhost.localdomain' is blocked
because of many connection errors.
Unblock with 'mysqladmin flush-hosts'
Unable to connect to database server!
Here is some information about this problem:
http://dev.mysql.com/doc/mysql/en/Blocked_host.html
After flushing hosts, the message goes away and the site works
normally. However, the message comes back several days later.
I do not want to increase the value of the max_connect_errors
variable, there isn't anything wrong with TCP/IP connections from that
host, and no one is trying to break in. This is the only web site on
that server which has this problem.
I want to understand this issue, and to that end I am posing several
specific related questions:
Question 1: What are the possible things that "connection error" could
mean, exactly? Could it mean incorrect password? Invalid database
selected? What else?
Question 2: What are the mistakes one could make in PHP which would
create this problem? I am an expert and will be able to understand
either code or conceptual explanations.
Question 3: Is it possible to get connection errors due to poor
database structure? If so, what sorts of structural mistakes could
cause it?
I will accept any answer which allows me to understand the causes of
my particular issue, even if it doesn't answer all the questions posed
here. |