Tuesday, March 11, 2008

Repair a MySQL database

Sometimes you can do something to your MySQL database which causes corruption. You can fix this with the following command:

$mysqlcheck <database> -u <adminuser> -p <password> --auto-repair

For example:

$mysqlcheck mythconverg -u root -p myPass --auto-repair

This will automatically repair any corruption found within the database schema.

No comments: