-
Stop mysqld.
-
Backup
/var/lib/mysql/ib*
files for safety reason. -
Add the following line into /etc/my.cnf:
innodb_force_recovery = 1
-
Restart mysqld and check service started or not. In-case service not started then change the innodb_force_recovery value to 4 then try to restart mysqld service again.
-
Dump all tables:#
mysqldump -A > dump.sql
-
Drop all databases which need recovery.
-
Stop mysqld.
-
Remove
/var/lib/mysql/ib*
-
Comment out or remove
innodb_force_recovery = 4
in/etc/my.cnf
-
Restart mysqld. Look at mysql error log. By default it should be /var/lib/mysql/server/hostname.com.err to see how it creates new ib* files.
-
Restore databases from the dump:
mysql < dump.sql
Last active
November 11, 2019 09:04
-
-
Save ganapathichidambaram/fc9b0397e28f4b29703cb887b2951ad3 to your computer and use it in GitHub Desktop.
Steps to Recover MariaDB InnoDB corrupted table
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment