I get this intermittently every other day or so even after I correct mysql (confirmed for sure)
/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "Warning, no valid mysql.sock file found.mysql has failed").
MYSQL FIX
Look in your /etc/my.cnf file and if there is a line like:
socket=/var/tmp/mysql.sock
remove it and restart MySQL
or
Command lines are as follows.
root [/]# cd /var/lib/mysql
root [/var/lib/mysql]# chmod 771 *
Now all folders and files in the /var/lib/mysql folder are chmod 700
We need to chmod mysql.sock as 777 so
root [/var/lib/mysql]# chmod 777 mysql.sock
you need to chmod your <hostname>.pid file as 660
to get your hostname:
root [/var/lib/mysql]# hostname
then :
root [/var/lib/mysql]# chmod 660 <hostname>.pid
This always fixes any mysql issues I've had, but this time around it keeps coming back odd enough. Is anyone having the same problem?
I'm using MySQL 4.1.8standard
Cpanel 10.x C34



LinkBack URL
About LinkBacks
Reply With Quote




