Corruption and Repairs
====================================================================================
MySQL Corruption
MySQL Check
mysqlcheck -options database
MySQL Check Options:
| -c | Checks tables for errors. It performs a CHECK TABLE operation on each table in the specified databases. |
| -r | Attempts to repair corrupted tables. It performs a REPAIR TABLE operation on each corrupted table. |
| -a | Analyzes tables for optimal performance. It performs an ANALYZE TABLE operation on each table. |
| -o | Optimizes tables to reduce fragmentation and reclaim unused space. It performs an OPTIMIZE TABLE operation on each table. |
| --databases db1 db2 | Checks and repairs tables in multiple databases (db1 and db2). |
| -A | Checks and repairs tables in all databases on the MySQL server. |
====================================================================================