Error

A

Anonymous

Guest
I have PHP, MysQL installed

MySQL works well on the console but when i attempt to connect to MySQL via PHP I get this error message


Warning: mysql_connect(): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Can anybody help :?:

Here is some info from phpinfo()

MYSQL_SOCKET : /tmp/mysql.sock
 
if you are running linux [redhat] then
run this command
service mysqld restart

and check again php script


and if windows

run the mysqld from the mysql/bin/ directory
.. :arrow:
 
Back
Top