0

The problem is that my MySQL server keeps crashing every few seconds. Even if I repeat a simple SQL command several times, the MySQL server goes down:

mysql> show databases;
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
ERROR: 
Can't connect to the server

Here is the error log after the crash. I have tried running myisamchk -r -f for all databases as well as mysqlcheck -aro with no luck. I have also tried upgrading my MySQL server from 5.0 to the 5.1.56 version. My my.cnf is also attached.

I have recently had problems with the hard disk and had to run fsck with the force (-f) option to be able to start my system.

Please help me to stop the server crashing. Thank you for any help.

1 Answer 1

2

Did you recently perform an upgrade? Did you update the privilege tables? The errors are similar to what you see during an upgrade that didn't create the privilege tables. You might want to try running the fix_privilege_tables command. This might be located at /usr/bin/mysql_fix_privilege_tables

In any-case the problem is with the privilege tables, you should probably be able to start mysql with the --skip-grant-tables option. Then restore, fix or re-create the privilege tables.

2
  • I am having the following error while running this command: ERROR 2013 (HY000) at line 388: Lost connection to MySQL server during query. I can't update the privileges table. It keeps crashing while performing this command. Same is for the --skip-grant-tables option. It keeps crashing.
    – Andrew
    Feb 11, 2012 at 0:38
  • Ouch. Well. You could always make sure everything is stopped, move everything out of your database directory, reinstall mysql, then try restoring your databases.
    – Zoredache
    Feb 11, 2012 at 1:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .