MySQL Forums
Forum List  »  Install & Repo

MySQL Service Stopped -- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
Posted by: Yola X
Date: September 06, 2010 11:17AM

Hi,

We have recently started using a dedicated hosting account with paid set-up, but two weeks in we suddenly discovered that our MySQL service had stopped, and we have been unable to restart it.

The only problem we had up to this point was that we were told the server was on a 'bad segment' but the server support said they had fixed that, and they won't look into this problem as they say its software/system related.

I have tried logging into the server via SSH and running /etc/init.d/mysqld start but it just produces the error message:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)

and running the alternative SSH command service mysqld start errors:
Timeout error occurred trying to start MySQL Daemon.
Starting MySQL: [FAILED]

We checked the mysql config in my.cnf and it is still looking in the right location:
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

We have tried checking the free space (plenty of room remaining) and the permissions and that all looks fine, although I suspect that wouldn't have suddenly changed.
The mysql directory in /var/lib/ -
drwxr-xr-x 34 mysql mysql 4096 Sep 5 22:27 mysql
The databases within /var/lib/mysql/ -
drwx------ 2 mysql mysql 4096 Sep 1 16:27 database1name
etc.

Yet each time the MySQL service fails to start it deletes the /var/lib/mysql/mysql.sock file.

When we check the error logs it just says:
[root@svr mysql]# tail -f /var/log/mysqld.log
thd=(nil) Attempting backtrace. You can use the following information to find out where mysqld died. If you see no messages after this, something went terribly wrong... frame pointer is NULL, did you compile with -fomit-frame-pointer? Aborting backtrace!

We are really at a loss as to what has happened with the server and how to repair the fault.

Can anyone assist us with this technical issue please?



Edited 1 time(s). Last edit at 09/06/2010 02:15PM by Yola X.

Options: ReplyQuote


Subject
Written By
Posted
MySQL Service Stopped -- ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
September 06, 2010 11:17AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.