Mandrake 7.1, latest PHP, latest stable Mysql

Warning: MySQL Connection Failed: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (111) in /home/httpd/html/test1.php on line
5

This doesn't work:
$db = mysql_connect("localhost", "root");

This does work:
$db = mysql_connect("localhost:/var/lib/mysql/mysql.sock", "root");

I can only assume that either PHP needs to be set to a default socket OR
mysql needs a my.cnf variable or option of some sort. When I do a:

mysqladmin variables

The socket is pointed correctly, /var/lib/mysql/mysql.sock

>From what I've found on other posts similar to this, people are told to go
read the manual and use a my.cnf file. I did and I'm not sure if I'm using
it correctly. Anything I set in the /etc/my.cnf is either ignored completely
or mysqladmin pukes.

Regards,
Ran Hooper
[EMAIL PROTECTED]

Reply via email to