I know that this is a common problem, and I have honestly searched
though many forums, faqs, 
and mailing list archives for an answer.  I get this message when
trying to connect to a local 
MySQL database with the statement

      $db = mysql_connect('localhost', 'myUserID', 'myPassword')
             or die("Could not connect to mysql");

I know that the MySQL server is running, I can connect to it on the
command line with the 
MySQL client, using the same user name and password as in the
mysql_connect statement. 
I know that the socket is there where it is supposed to be, and that
everyone has read and
execute privileges to it. localhost is defined correctly in my hosts
file. I have tried this with
both the defaults for the socket 's path in php.in, and by explicitly
typing in the path to the socket.
The statement fails with the same error message no matter which I do.

I have tried everything that I have found to look at on the many
forums, etc. that I have looked
at. I am at a loss as what to do next. Any suggestions would be

Thank you
Roger deBry

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to