ERROR 2013 (HY000): Lost connection to MySQL server during query


InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Error: the size of single-table tablespace file ./my_database/wp_badTable.ibd

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

mysql> drop database my_database;
ERROR 2013 (HY000): Lost connection to MySQL server during query

service mysqld stop
Shutting down MySQL... SUCCESS!

# Backup corrupted database files:
mv -v /var/lib/mysql/my_database/wp_wfHoover.* /root/
`/var/lib/mysql/my_database/wp_badTable.frm' -> `/root/wp_badTable.frm'
`/var/lib/mysql/my_database/wp_badTable.ibd' -> `/root/wp_badTable.ibd'

service mysqld start
Starting MySQL.. SUCCESS!

mysql> drop database my_database;
Query OK, 30 rows affected (0.40 sec)

service mysqld restart
Shutting down MySQL.. SUCCESS!
Starting MySQL.. SUCCESS!

200430 14:12:18 [Note] /usr/sbin/mysqld: Normal shutdown
200430 14:12:21 [Note] /usr/sbin/mysqld: ready for connections.

Now you can recreate database and restore from backups.

Leave a Reply

Your email address will not be published. Required fields are marked *