List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:June 8 1999 6:06pm
Subject:Re: Mysql Connection failed HELP!
View as plain text  
Ritschie wrote:
> 
> Hi everyone!
> 
> I have just finished installing Apache and PHP3 and MySQL.
> I have compiled PHP3 with the mysql support which should work fine, it
> knows the mysql functions. PHP3 works fine with Apache.
> 
> I have written a test program which selects everything in a table.
> But I have recieved the following error message during mysql_connect().
> Is it possible that the user information in mysql_connect() function is
> wrong?
> 
> The error message:
> ------------------
> 
> Warning: MySQL Connection Failed: Can't connect to local MySQL server
> through socket '/var/lib/mysql/mysql.sock' (111) in
> /home/user/public_html/index.php3 on line 7
> 
> I don't have any mysql.sock files in /var/lib/mysql.
> What is this mysql.sock good for?
> Help me please!
> 
> Thanks!
> 
> Ritschie
> 
> http://ludens.elte.hu/~krichard
> 

That is is exaclty the problem. Your script is looking for a Unix socket
that is not there. You can either try connecting through TCP/IP or start
mysqld with a special option to listen on the socket where you PHP wants
to see it.

-- 
Sasha Pachev
http://www.sashanet.com/ (home)
http://www.direct1.com/ (work)
Thread
Mysql Connection failed HELP!Ritschie8 Jun
  • Re: Mysql Connection failed HELP!Sasha Pachev8 Jun
    • Re: Mysql Connection failed HELP!Ritschie9 Jun
    • Re: Mysql Connection failed HELP!Ritschie10 Jun
  • Re: Mysql Connection failed HELP!Christian Mack8 Jun
    • Re: Mysql Connection failed HELP!Ritschie9 Jun
      • Re: Mysql Connection failed HELP!Christian Mack9 Jun