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)