Recover after fatal InnoDB crash.

May 03, 2015 16:48


Stop server. Make a full binary backup of datadir.

Follow http://dev.mysql.com/doc/refman/5.6/en/innodb-troubleshooting.html
Obtain consistent database dump.
Stop server.
Remove all databases except "mysql". In the "mysql" database, remove tables mysql.slave_master_info mysql.slave_worker_info mysql.slave_relay_log_info mysql.innodb_table_stats mysql.innodb_index_stats (both .frm and .ibd if exists).
Remove InnoDB logs and tablespace.
Start server.
Do 'mysql_upgrade --defaults-extra-file=/etc/mysql/debian.cnf --force --upgrade-system-tables'.
Import your backups.

mysql, it

Previous post Next post
Up