Google Answers Logo
View Question
 
Q: What are MySQL connection errors and what causes them? ( No Answer,   0 Comments )
Question  
Subject: What are MySQL connection errors and what causes them?
Category: Computers > Programming
Asked by: vladkornea-ga
List Price: $7.00
Posted: 03 Jun 2004 07:20 PDT
Expires: 19 May 2006 10:09 PDT
Question ID: 355857
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.

Request for Question Clarification by wildeeo-ga on 04 Jun 2004 13:02 PDT
Hi,

Could you tell me whether you using persistent MySQL connections in the scripts?

Request for Question Clarification by wildeeo-ga on 04 Jun 2004 13:07 PDT
Also, is the hosting shared, or are you on a dedicated (or virtual
dedicated) server?

Thanks

Clarification of Question by vladkornea-ga on 04 Jun 2004 13:36 PDT
<i>Also, is the hosting shared, or are you on a dedicated (or virtual
dedicated) server?</i>

The hosting is shared.

Clarification of Question by vladkornea-ga on 22 Jun 2004 13:45 PDT
Host was set to "127.0.0.1"; I changed it to "localhost" and will see
if this makes a difference.
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy