To repair corrupted innodb on a cPanel server do the following steps: #/etc/init.d/mysql stop
- Backup /var/lib/mysql/ib*
- Add the following line into /etc/my.cnf
innodb_force_recovery = 4
#/etc/init.d/mysql restart
# mysqldump -A > dump.sql
- Drop all databases which need recovery.
- Stop mysqld.
#/etc/init.d/mysql stop
- Remove /var/lib/mysql/ib*
- Comment out innodb_force_recovery in /etc/my.cnf
- Restart mysqld.
#/etc/init.d/mysql restart
- Restore databases from the dump:
#mysql < dump.sql
---