hi.
quick fix:
if it's really in /var/lib/mysql/, just make a symlink in /tmp...
> ln -s /var/lib/mysql/mysql.sock /tmp/mysql.sock
not-so-quick fix:
or, recompile php w/ the path to mysql and it should figure it out.
-ravi.
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Friday, May 25, 2001 1:20 PM
To: [EMAIL PROTECTED]
Subject: Socks error connecting to mysql on localhost
Hi,
Using linux redhat 6.2, apache1.3.20 (compiled fresh), php4.0.5 (compiled
fresh with msql support), mysql 3.23.38 (rpm install for server and
client).
I run the following php4 test script in query.php from a browser:
snip--
<?php
$hostname="localhost";
$username="XXXX";
$password="****";
$databasename= "midisland;
$tablename = "list";
?>
<?php
mysql_connect($hostname, $username, $password);
$db_table = mysql_list_dbs();
?>
snip--
I get the following errors when I view the souce in my browser
<br>
<b>Warning</b>: MySQL Connection Failed: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (111)
in <b>/home/httpd/html/query.php</b> on line <b>21</b><br>
<br>
<b>Warning</b>: MySQL Connection Failed: Can't connect to local MySQL
server through socket '/tmp/mysql.sock' (111)
in <b>/home/httpd/html/query.php</b> on line <b>22</b><br>
<br>
<b>Warning</b>: MySQL: A link to the server could not be established in
<b>/home/httpd/html/query.php</b> on line <b>22</b><br>
<br>
<b>Warning</b>: Supplied argument is not a valid MySQL result resource in
<b>/home/httpd/html/query.php</b> on line <b>23</b><br>
mysql.sock is in /var/lib/mysql and not /tmp/mysql.sock.
Can someone give me an idea as to what's wrong?
Thanks,
Frank
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php