Troubleshooting InnoDB corruption


  • Applies to: Grid
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: Account Center access
  • Applies to: Legacy DV & VPS Hosting
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: Account Center access
  • Applies to: VPS Hosting
    • Difficulty: Medium
    • Time Needed: 20
    • Tools Required: Account Center access

Overview

The following article contains information on troubleshooting an innodDB corruption issue.

STATEMENT OF SUPPORT:
Please keep in mind that troubleshooting the configuration/functionality of third-party applications is not covered by our statement of support. These resources were provided as a courtesy to assist you to the extent of our abilities. For more information on our statement of support, feel free to click here.

Before Starting

Before performing any major changes on your server, we recommend creating a full backup of your server. To see a list of available backup options, feel free to view the documentation below:

Instructions

First, we will want to ensure that force innodb recovery is enabled.

  1. Click on the blue Admin button next to your Grid server.grid1.png
  2. Located under Databases, select GridContainers.
    grid2.png
  3. Scroll down to MYSQL, and select Manage.
    grid3.png
  4. Scroll down to MySQL Config, and select Edit Config.
    grid-edit_config.png
  5. If you wish to keep a copy of your config file, copy/pate the data into a text editor: Notepad, TextEdit, Visual Studio Code, etc.
  6. Insert the following to your config file: innodb_force_recovery=1

    Using Higher Levels:
    If using the number "1" is not successful, you can attempt to use alternate numbers for your config file. However, do keep in mind higher levels could potentially permanently corrupt data as described in MySQL's documentation.

  7. Once you've finished, select Save Config.
    grid5.png
  8. Export all of your databases.
  9. Reset the my.cnf file on your Grid Container:
    • Select Edit Config, as done previously in Step 1.
    • Select Revert To Original.
      grid-reset-mycnf-2.png
    • Then select Save Config.
  10. Drop the databases from MySQL.
  11. Re-import the databases.

Instructions

As a general outline, the process to troubleshooting innodb corruption entails the following:

  1. Backup or Export all of the databases
  2. Force innodb recovery via the my.cnf file.
  3. Drop all tables in the databases.
  4. Restore/Re-import the databases.

Below is reputable third-party documentations from Plesk and cPanel which provide more detailed information on the exact commands and steps that can be taken. However, do keep in mind that the sources and the instructions found within them are provided as a courtesy and are not covered within Media Temple's statement of support.