Re: mysql_connect() socket issue
Posted by:
James King
Date: January 10, 2007 01:17PM
still no resolution.
typing:
php -r "mysql_connect('localhost', 'username', 'password');"
results in:
Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in Command line code on line 1
While the mysql CLI is able to connect fine using localhost. Doing so and running the 'status' macro shows that it's using /tmp/mysql.sock
It bothers me that php won't throw the error if I specify the machine's domain in the connection parameters instead of the 'localhost' keyword. I double check as well that there's only a single instance of mysqld running just to be sure.
I've been scouring the forums... any thoughts?
Subject
Written By
Posted
Re: mysql_connect() socket issue
January 10, 2007 01:17PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.