Repairing tables
When a table is damaged, sometimes replacing it with a backup is not necessary. It is certainly a solution, but it implies some data loss unless the table is unchanged since the last backup. When possible, repairing the damaged table is a better solution.
The procedure we must follow to repair the table depends on the storage engine.
InnoDB has a recovery process that is launched on server startup. While this process is automatic, it must be configured by the DBA.
MyISAM and Aria also have an automatic recovery process on startup. But they also support recovery via the REPAIR TABLE SQL statement or when the server is stopped, via specific tools distributed with MariaDB.
Other storage engines also support REPAIR TABLE.
Note
Some repairing ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access