MySQL database dump fails with error:
mysqldump: Got error: 1146: Table '<TABLENAME>' doesn't exist when using LOCK TABLES
- Probably InnoDB data files were deleted and recreated but corresponding .frm files of InnoDB tables from the database directory were not removed, or .frm files were moved to another database.
- Incorrect permissions and ownership on table's files in mysql data directory
- Table is corrupted
- Table created in uppercase
- Run the following command and check if the table is listed:
mysql> show tables
If not, move
.frmfile out from the database directory.
- Check permissions and ownership on table's files in mysql data directory: on Linux, owner should be mysql user
- Try to repair the table:
mysql> REPAIR TABLE example