MySQLD socket file problem

streamservice

Verified User
Joined
Dec 14, 2005
Messages
173
Location
The Netherlands
Hello,

I first have to give some information about the server:
Debian 3.1
DirectAdmin V1.27.4

Some commands and the output:
server1:/home/quicki# locate my.cnf
/etc/mysql/my.cnf
/usr/local/mysql-standard-4.1.10-pc-linux-gnu-i686/include/my.cnf
server1:/# cd tmp
server1:/tmp# ls
mysql.sock
server1:/home/quicki# locate mysql.sock
server1:/home/quicki# locate mysqld.sock
server1:/home/quicki#

Error:
Error connecting to MySQL: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
(url where this problem occured: http://85.12.26.30:2222/CMD_DB?domain=resfvv.streamservice.nl)

The same problem was yesterday with PHP, but this was fixed by changing some settings in php,ini.

How can I solve this problem?
 
Hello,

I believe the mysql.sock file lives in /tmp/mysqld.sock on debian.
So you'd edit:
/usr/local/directadmin/conf/mysql.conf
and add:

socket=/tmp/mysqld.sock

or to wherever your socket actually is. You can find out by typing:

netstat -l | grep mysql

Or sometimes the socket just needs reloading in which case restarting mysqld would fix it.

John
 
DirectAdmin Support said:
Hello,

I believe the mysql.sock file lives in /tmp/mysqld.sock on debian.
So you'd edit:
/usr/local/directadmin/conf/mysql.conf
and add:

socket=/tmp/mysqld.sock

or to wherever your socket actually is. You can find out by typing:

netstat -l | grep mysql

Or sometimes the socket just needs reloading in which case restarting mysqld would fix it.

John

Thank you, for all other users off Debian and DirectAdmin. The socket file was located in /tmp/mysql.sock (I also added this to the php.ini earlier and it works fine).
 
Back
Top