MySQL Error /tmp/mysql.sock (Searched already)

ScathDeSolas

Verified User
Joined
Feb 10, 2011
Messages
52
Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)

Funny thing though is that all my sites still work and they can load their database(s), the phpmyadmin also works and I can login and view tables,etc. But directadmin does not let me create databases, view, etc.

Error connecting to MySQL: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)
 
Code:
server:/etc# ls -la /var/lib/mysql/mysql.sock
ls: cannot access /var/lib/mysql/mysql.sock: No such file or directory
server:/etc# netstat -lnp | grep mysql
tcp        0      0 127.0.0.1:3306          0.0.0.0:*               LISTEN      13278/mysqld
unix  2      [ ACC ]     STREAM     LISTENING     65938    13278/mysqld        /var/run/mysqld/mysqld.sock
server:/etc# ps ax | grep mysql
13241 pts/0    S      0:00 /bin/sh /usr/bin/mysqld_safe
13278 pts/0    Sl     0:02 /usr/sbin/mysqld --basedir=/usr --datadir=/usr/local/mysql/data --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock
13280 pts/0    S      0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
14978 pts/0    S+     0:00 grep mysql
server:/etc# /etc/init.d/mysqld stop
Stopping MySQL database server: mysqld.
server:/etc# /etc/init.d/mysqld start
Starting MySQL database server: mysqld.
Checking for corrupt, not cleanly closed and upgrade needing tables..
server:/etc#
 
FIXED:

Code:
server:/var/run/mysqld# nano /usr/local/directadmin/conf/mysql.conf

ADDED LINE:
Code:
socket=/var/run/mysqld/mysqld.sock
 
Back
Top