The REPAIR TABLE method is only applicable to MyISAM
, ARCHIVE
, and CSV
tables.
You can use REPAIR TABLE if the table checking operation indicates that there is a corruption or that an upgrade is required. For example, to repair a MyISAM
table, use this statement:
REPAIR TABLE t1;
mysqlcheck --repair provides command-line access to the REPAIR TABLE statement. This can be a more convenient means of repairing tables because you can use the --databases or --all-databases option to repair all tables in specific databases or all databases, respectively:
db_name
...