Repair MySQL database with mysqlcheck
To check and repair all databases in a database run
1 |
mysqlcheck -A --auto-repair -u root -p |
Forcefully optimize all tables, automatically fixing table errors that may come up.
1 |
mysqlcheck -A --auto-repair -f -o -u root -p |
To check all databases
1 |
mysqlcheck --all-databases -u root -p -c |
To analyze all tables in all databases:
1 |
mysqlcheck --all-databases -u root -p -a |
To repair all tables in all databases:
1 |
mysqlcheck --all-databases -u root -p -r |
To optimize all tables in all databases:
1 |
mysqlcheck --all-databases -u root -p -o |
See MySQL Repair