Make sure that your php.ini and your my.cnf both agree on where the socket 
file is going to be put.  And if you make any changes, be sure to restart 
both PHP/Apache and MySQL.  You might also check the logs and make sure 
that MySQL is actually launching, it might be encountering an error and 
quietly dieing as soon as you launch it.  I'm successfully running Apache 
1.3.19, PHP 4.0.5, and MySQL 3.23.38.  When I upgraded from MySQL 3.23.32 I 
had that same warning come up, all it took was restarting mysqld and the 
warning went away.

Hope you can get it figured out...


At 12:48 AM 5/21/01 +0800, rice wrote:
>I have the same problem as you when using apache1.3.19, php4.0.5 and
>mysql3.23.38 and get the same warning message. I've spent many time to
>the system again but failed. So I forgive to use the newest version and use
>apache1.3.17, php4.0.4 and mysql3.23.38. It works now!
>Hope someone can help!
>""Derick Dorner"" <[EMAIL PROTECTED]> ?????
>I receive the error when trying to connect to MySQL database:
>Warning: MySQL Connection Failed: Can't connect to local MySQL server
>through socket '/tmp/mysql.sock' (111) in /usr/home/cupid/www/sql.php on
>line 13
>The code I use to connect is:
>$link = mysql_connect ("localhost", "username", "password");  file://with
>the username and pw filled in obviously.
>Is this some type of config problem between MySQL and PHP or what? Any help
>is appreciated.
>It ia a LAMP system BTW.

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to