Help - Search - Members - Calendar
Full Version: an't connect to local MySQL server through socket
The Planet Forums > System Administration > Web Hosting
yoss
Several services are down including mysql. I am not sure what's wrong, but I cannot seem to restart mysql with either shell or cpanel. I am copy and pasting the error message for restarting mysql from cpanel below. shell cmd find does indeed locate the socket file. Please help! Thanks..


/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "mysql has failed").
James Jhurani
QUOTE (yoss @ Dec 31 2008, 01:05 PM) *
Several services are down including mysql. I am not sure what's wrong, but I cannot seem to restart mysql with either shell or cpanel. I am copy and pasting the error message for restarting mysql from cpanel below. shell cmd find does indeed locate the socket file. Please help! Thanks..


/usr/bin/mysqladmin: connect to server at 'localhost' failed error: 'Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111)' Check that mysqld is running and that the socket: '/var/lib/mysql/mysql.sock' exists! mysql has failed, please contact the sysadmin (result was "mysql has failed").


The above simply states that the socket file cannot be found, and MySQL is likely not running. You will need to look at the mysql error log, which in cPanel should be in /var/lib/mysql/{$hostname}.err

I would open a ticket with Technical Support. Unless you feel you can correct this based on the information in the error log.
yoss
QUOTE (James Jhurani @ Dec 31 2008, 12:42 PM) *
The above simply states that the socket file cannot be found, and MySQL is likely not running. You will need to look at the mysql error log, which in cPanel should be in /var/lib/mysql/{$hostname}.err

I would open a ticket with Technical Support. Unless you feel you can correct this based on the information in the error log.


It turns out that the partition /var was at 100% and thus mysql.sock couldn't be written for it to restart for localhost access.

After some consternation debating over which files to move to - hopefully - not break things, I finally moved an inactive directory (over 1gb in size) in /var/lib/mysql over to another partition with plenty of space. There's now a bit more space in the /var partition, and after restarting mysql, the .sock error fails to occur - and things work... for now...

My next question is - how do i resize the /var directory ?

http://forums.theplanet.com/index.php?showtopic=91201
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.