Installation and configuration iussues

Moderators: egami, macek, gesf

Post Reply
User avatar
php-forum Super User
php-forum Super User
Posts: 1279
Joined: Sat Mar 22, 2003 9:42 am
Location: Mumbai, India

Wed Sep 03, 2003 3:21 am

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

php-forum Active User
php-forum Active User
Posts: 364
Joined: Mon Jul 14, 2003 9:39 pm
Location: /Earth/Xion

Thu Sep 04, 2003 5:42 am

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:

Post Reply