Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I am unable to start mysqld. I tried innodb_force_recovery = 4 in /etc/my.cnf Here is the relevant lines in /var/log/mysqld.log which suggest that recovery fails and I probably need to recover from backup.

131128 20:19:26 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
131128 20:19:26 [Note] Plugin 'FEDERATED' is disabled.
131128 20:19:26 InnoDB: The InnoDB memory heap is disabled
131128 20:19:26 InnoDB: Mutexes and rw_locks use GCC atomic builtins
131128 20:19:26 InnoDB: Compressed tables use zlib 1.2.3
131128 20:19:26 InnoDB: Using Linux native AIO
131128 20:19:26 InnoDB: Initializing buffer pool, size = 64.0M
131128 20:19:26 InnoDB: Completed initialization of buffer pool
131128 20:19:26 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 199931103586
131128 20:19:26  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 199931108028
InnoDB: Database page corruption on disk or a failed
InnoDB: file read of page 613.
InnoDB: You may have to recover from a backup.

I do have a backup of the database (using mysqldump). But I cannot restore because mysqld itself is not able to run. When I run mysqld I get

MySQL Daemon failed to start.

On running mysqladmin variables I get

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!

And indeed /var/lib/mysql/mysql.sock is missing. And there is no mysql.sock file on the entire system.

How should I proceed. I am no DBA so any help is greatly appreciated. MySQL version is 5.5.28 and I am running it on CentOS6

UPDATE 1 - innodb_force_recovery = 6 does start the server

UPDATE 2 - On running mysqlcheck -u root -p --all-databases, most tables have only index problems but on one table (called user), it simply crashes.

mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ... '

On running mysqldump also, I also got similar error

mysqldump: Error 2013: Lost connection to MySQL server during query when dumping table `user` at row: 401

Is there something I can do about this user table now?

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.