↑ ↓ select, Enter open, Esc close

Check all MySQL tables for errors

root@server
mysqlcheck --all-databases --check --silent

Runs CHECK TABLE on every table of all databases. With --silent, only tables with errors or warnings are shown. Worthwhile after crashes, full disks or messages like “Table is marked as crashed”.

Note: The check creates load and may briefly lock MyISAM tables. mysqlcheck --repair can only repair MyISAM and Aria tables, not InnoDB.

Also searched as

  • mysql table corrupted
  • table is marked as crashed
  • check database for errors

Related one-liners

All in MySQL and MariaDB

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.