SQL Problems
Gontran
plug-discuss@lists.plug.phoenix.az.us
Thu, 21 Mar 2002 23:03:33 -0700
* A.P. Etc (ap_etc@yahoo.com) wrote:
>
> $db = mysql_connect("localhost", "root");
> mysql_select_db("test",$db);
>
> And I'm getting this error in my browser:
>
> Warning: Can't connect to local MySQL server through socket
> '/var/tmp/mysql.sock' (111) in /usr/local/apache/htdocs/phptest.php on line
> 24
> Warning: MySQL Connection Failed: Can't connect to local MySQL server
> through socket '/var/tmp/mysql.sock' (111) in
> /usr/local/apache/htdocs/phptest.php on line 24
Heh. Hate when that happens. 1. does /var/tmp/mysql.sock exist and is
it the actual mysql unix socket? (quick jump into mysql client, and issue
'\s' (no quotes) at the mysql> prompt)
If it's different, I believe you can specify the socket in the connection
function.
hth,
Gontran