Skip to main content

OpenStack MySQL command

WhatForce wedelete will need to do for the recovery is to stop mysql and put it in innodb_force_recovery to attempt to backup all databases.snapshot

serviceuse mysqldcinder;
stopupdate mkdirsnapshots /root/mysqlbakset cpstatus='deleted', -rpdeleted='1' /var/lib/mysql/ib*where /root/mysqlbakid vim='<id>';
/etc/my.cnf
update

Yousnapshots canset startstatus='deleted', fromdeleted='1' 1where to 4, go up if it does not start and check mysql logs if it keeps crashing.

innodb_force_recoveryid = 1

service mysqld start
mysqldump -A '<id> dump.sql';

Drop all databases that needs recovery.

service mysqld stop
rm /var/lib/mysql/ib*

Comment out innodb_force_recovery in /etc/my.cnf

service mysqld start

Then check /var/lib/mysql/server/hostname.com.err to see if it creates new ib's.
Then you can restore databases from the dump:mysql < dump.sql