How to repair a DB on MySQL

How to repair a DB on MySQL

REPAIR TABLE & Database On MySQL

==============================

The REPAIR TABLE method is only applicable to MyISAMARCHIVE, 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:

To repair a single database:
 
mysqlcheck --repair --databases db_name ...

To repair all databases:

mysqlcheck --repair --all-databases