raylin
04-15-2001, 07:45 PM
I can manage MySQL thru phpMyAdmin, but can not connect to MySQL using the function on my php file:
mysql_connect ("localhost", $myid, $mypd);
The error message is :
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/sites/site1/web/dbcall.inc on line 10
I check /tmp/mysql.sock:
[root admin]# ls -l /tmp/my* /home/mysql/mysql.sock
srwxrwxrwx 1 mysql root 0 Apr 16 06:39 /home/mysql/mysql.sock
lrwxrwxrwx 1 root root 22 Apr 16 06:39 /tmp/mysql.sock -> /home/mysql/mysql.sock
[root admin]#
It seems OK. (I am not sure if the owner or group is fine)
Anyone gives me suggestions to fix this?
Thanks in advance.
mysql_connect ("localhost", $myid, $mypd);
The error message is :
Warning: MySQL Connection Failed: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (111) in /home/sites/site1/web/dbcall.inc on line 10
I check /tmp/mysql.sock:
[root admin]# ls -l /tmp/my* /home/mysql/mysql.sock
srwxrwxrwx 1 mysql root 0 Apr 16 06:39 /home/mysql/mysql.sock
lrwxrwxrwx 1 root root 22 Apr 16 06:39 /tmp/mysql.sock -> /home/mysql/mysql.sock
[root admin]#
It seems OK. (I am not sure if the owner or group is fine)
Anyone gives me suggestions to fix this?
Thanks in advance.
