Get your server issues fixed by our experts for a price starting at just 25 USD/Hour. Click here to register and open a ticket with us now!

Author Topic: How to repair innodb on a cPanel Server?  (Read 4450 times)

0 Members and 1 Guest are viewing this topic.

lijeshk

  • Guest
How to repair innodb on a cPanel Server?
« on: November 04, 2013, 10:23:52 am »

To repair corrupted innodb on a cPanel server do the following steps:

  • Stop mysqld.
          #/etc/init.d/mysql stop
  • Backup /var/lib/mysql/ib*
  • Add the following line into /etc/my.cnf
            innodb_force_recovery = 4
  • Restart mysqld.
           #/etc/init.d/mysql restart
  • Dump all tables:
          # 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

---