Fixing Corrupt InnoDB Tables

Issue: CentOS 7.x server using cPanel. Admin receives alert email containing the following example:

cPanel & WHM has determined that the following database tables are corrupt:

Database Error
mysql mysql.gtid_slave_pos
Error : Unknown storage engine ‘InnoDB’
error : Corrupt
mysql.innodb_index_stats
Error : Unknown storage engine ‘InnoDB’
error : Corrupt
mysql.innodb_table_stats
Error : Unknown storage engine ‘InnoDB’
error : Corrupt
mysql.slave_master_info
Error : Unknown storage engine ‘InnoDB’
error : Corrupt
mysql.slave_relay_log_info
Error : Unknown storage engine ‘InnoDB’
error : Corrupt
mysql.slave_worker_info
Error : Unknown storage engine ‘InnoDB’
error : Corrupt

Solution: Run the check command against table to facilitate repair. Syntax and example:

CHECK TABLE mysql.gtid_slave_pos FAST QUICK;

5 thoughts on “Fixing Corrupt InnoDB Tables”

  1. CHECK TABLE mysql.gtid_slave_pos FAST QUICK;
    CHECK TABLE mysql.innodb_index_stats FAST QUICK;
    CHECK TABLE mysql.innodb_table_stats FAST QUICK;
    CHECK TABLE mysql.slave_master_info FAST QUICK;
    CHECK TABLE mysql.slave_relay_log_info FAST QUICK;
    CHECK TABLE mysql.slave_worker_info FAST QUICK;

    Reply
  2. Error:

    180917 12:35:07 [ERROR] mysqld: Table ‘./biz360db_dbws/wp_posts’ is marked as crashed and should be repaired

    Example fix existing:

    CHECK TABLE biz360db_dbws.wp_posts FAST QUICK;

    Reply

Leave a comment

BlogLogistics