30.4. Repairing InnoDB TablesAs mentioned earlier in this chapter, you can check InnoDB tables by using the CHECK TABLE statement or by using a client program that issues the statement for you. However, if an InnoDB table has problems, you cannot fix it by using REPAIR TABLE because that statement applies only to MyISAM. If a table check indicates that an InnoDB table has problems, you should be able to restore the table to a consistent state by dumping it with mysqldump, dropping it, and re-creating it from the dump file: shell> mysqldump db_name table_name > dump_file shell> mysql db_name < dump_file In the event of a crash of the MySQL server or the host on which it runs, some InnoDB tables might need repairs. Normally, it suffices simply to restart the server because the InnoDB storage engine performs auto-recovery as part of its startup sequence. In rare cases, the server might not start up due to failure of InnoDB auto-recovery. If that happens, use the following procedure:
|