List:General Discussion« Previous MessageNext Message »
From:Michael Stassen Date:November 18 2005 8:33pm
Subject:Re: Connection Problem
View as plain text  
Tripp Bishop wrote:
> Hello all,
> Suddenly in the last hour or so the connection speed
> between our webserver and database server has
> skyrocketed to the point that our site is no longer
> usable! Just trying to connection via the mysql client
> takes a long time. Once the connection is established,
> however, queries seem to execute in a timely fashion.
> As far as we can tell the network connection between
> the two boxes is fine (at least testing by ping OK)
> and again, once connected everything seems fine.

It's hard to be sure without knowing more, but if the network is working, and 
mysql works fine once connected, it sounds like it might be a DNS problem. 
Often the solution is to list hosts by IP rather than hostname in the mysql user 
table, and run mysqld with --skip-name-resolve.  See 
<>, about a third of 
the way down, for some hints about DNS problems.

> We've seen some errors in our logs that state: Can't
> connect to local MySQL server through socket
> '/var/lib/mysql/mysql.sock'. Why would php
> mysql_connect be trying to connect to the local MySQL
> Server? Our connection string should point it to the
> db server.

Which logs?  Are you sure this is the same problem?  What is the connection 
string?  Do you capture error messages from mysql in your php script?

> We're using php 4.3.9 and MySQL 4.0.20.
> Thanks for any help,
> Tripp

A "key" questionMikhail Berman17 Nov
  • Re: A "key" questionJasper Bryant-Greene17 Nov
  • Re: A "key" questionPeter Brawley17 Nov
RE: A "key" questionMikhail Berman17 Nov
  • Re: A "key" questionJeremy Cole17 Nov
RE: A "key" questionMikhail Berman18 Nov
  • Re: A "key" questionJeremy Cole18 Nov
  • Re: A "key" questionMichael Stassen18 Nov
RE: A "key" questionMikhail Berman18 Nov
  • Re: A "key" questionMichael Stassen18 Nov
RE: A "key" questionMikhail Berman18 Nov
  • Re: A "key" questionDavid Griffiths18 Nov
  • Connection ProblemTripp Bishop18 Nov
    • Re: Connection ProblemMichael Stassen18 Nov
      • Re: Connection ProblemTripp Bishop18 Nov