Issue: When you try to create a MySQL database dump, you may encounter the following error:
# mysqldump -u root -p database | gzip -9 > database.sql.gz
Enter password:
mysqldump: Got error: 1016: Can’t open file: ‘./database/some_table.frm’ (errno: 24) when using LOCK TABLES
Enter password:
mysqldump: Got error: 1016: Can’t open file: ‘./database/some_table.frm’ (errno: 24) when using LOCK TABLES
Solution: Add --lock-tables=false to the mysqldump command:
# mysqldump -u root -p database --lock-tables=false | gzip -9 > database.sql.gz
Enter password:
Enter password: