Fix MySQL Tables with myisamchk

At times tables in MySQL can crash and repair with PHPMyAdmin or from within the MySQL Server console won’t work. In these cases, try to repair (recover) the table with myisamchk using these steps:

Go to the database directory with:

cd /var/lib/mysql/[database name]

Run myisamchk with:

myisamchk -r [table name]

Should that fail, use:

myisamchk -r -v -f [table name]

The flags mean:

  • -r = recover
  • -v = verbose
  • -f = force

https://dev.mysql.com/doc/refman/8.0/en/myisamchk-repair-options.html

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.