mysqlcheck -u root -p mydb

Category: Databases & SQL

mysqlcheck -u root -p mydb

Check tables for corruption

Scans every table in mydb and reports problems; --repair attempts fixes and --optimize defragments. Run a backup before repairing. Related: mysqladmin status.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.