MySQL check for crashed table

The most efficient way I have found is to use the commandline mysqlcheck tool:

mysqlcheck -u mydbuser -p mydbname

This will access mydbname using user mydbuser and prompting for that user's password. It will then check each table in the specified database.

See https://dev.mysql.com/doc/refman/5.7/en/mysqlcheck.html

Note: this is not how phpMyAdmin does it, so this is not strictly an answer for the original question, but I'm putting this here because Google sends searches for mysql show crashed tables here.


I bet that

SHOW TABLE STATUS FROM `db` 

is the thing you're looking for.

Take a look at this line. I think that if ENGINE is null (empty), it may be because table is crashed


If you have a shell access, the mysqlanalyze utility could help.

mysqlanalyze dbname

Official Documentation


show table status where comment like '%crash%';

Tags:

Mysql