I have mysql installed and running what appears to be fine. I created a
database, added a table to it with no problems. I also have php up and
running on my apache server, I did a quick "hello world" as a test. In spite
of all this, it appears to have a problem connecting to the database.
It uses this code in the PHP tags:
$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
Does anyone have an ideas on what is wrong? I've taken a glance through the
apache modules, and nothing appears to be missing. Can anyone help me figure
out what I have overlooked?
-A.P. Etc
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at
http://mail.yahoo.com