PHP and MYSQL help
Date: 01/03/06
(MySQL Communtiy) Keywords: mysql, database, sql
While trying to connect to the mysql database, I get this error:
Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
So I look up the solutions for this error. I discover that I need to edit a my.cnf file and change the socket setting. I wish it was that easy. I check what socket is set too.
[client]
#password = my_password
port = 3306
socket = /opt/local/var/run/mysqld/mysqld.sock
Not the socket the server is trying to connect to.
The file is located in /opt/local/etc/mysql4 and I also copied it to /opt/local/etc incase.
The password and username is correct, I can manually connect to the database.
Using a Mac OSX.4 server.
DB Server version is 4.1.15
Connection: Localhost via UNIX socket
I am out of ideas, can anyone help me?
Source: http://www.livejournal.com/community/mysql/80709.html