wavewind

Registered
Aug 1, 2007
2
0
51
I've the WHM 11.2.0

The mysql is not running, when I restart the mysql service, it came up with this:

Waiting for mysql to restart.... . . . . . . . . . . finished.

mysql status

/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").

I thought maybe I should upgrade mysql but it seems the version is up to date.

MySQL Setup Script Version 7.0
Loaded cPPkgs::MySQL ok!
This is the cPPkgs::MySQL 4.1.22 installer for Linux.
MySQL 4.1.22 is up to date

Any help is very appreciated!

Thanks,
Stephen
 

jayh38

Well-Known Member
Mar 3, 2006
1,213
0
166
So did you see if your socket exists in tmp? Even if you don't know, just run through these commands


cd /var/lib/mysql
touch mysql.sock
chown mysql:mysql mysql.sock
chmod 1777 mysql.sock
ln -s /var/lib/mysql/mysql.sock /tmp
chmod 1777 /tmp
/scripts/mysqlup --force
/etc/rc.d/init.d/mysql restart
 

webstyler

Well-Known Member
Nov 20, 2003
439
0
166
So did you see if your socket exists in tmp? Even if you don't know, just run through these commands


cd /var/lib/mysql
touch mysql.sock
chown mysql:mysql mysql.sock
chmod 1777 mysql.sock
ln -s /var/lib/mysql/mysql.sock /tmp
chmod 1777 /tmp
/scripts/mysqlup --force
/etc/rc.d/init.d/mysql restart
Hi

Mysql crash.. work within any minute ago, I have changed only a value on my.cnf .. and the try restart.. but crash.

If try to stop or restart nothing happen :(

I have try code posted but not work.. he freeze at
Preparing ....

:(

all db is down :'(

any help ?
 

kipper3d

Well-Known Member
Jul 14, 2002
52
0
156
I have similar issue however it affects only 1 site.

Warning: mysql_connect() [function.mysql-connect]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /home/xxxxx/public_html/inc/class_db.php on line 12
Error Connecting to MySQL database

I am running mysql 5.0.67

Could it be mysql compatibility issue of the website? We recently migrated that site from a server with mysql 4 to current mysql5


Other info:
socks exists in /tmp/mysql.socks
my.cnf has nothing in it but
[mysqld]
skip-bdb

Thanks!

-John
 
Last edited: