MySQL – mysqldump: Got error: 1016: Can’t open file: ‘./exampledb/xxx.frm’ (errno: 24) when using LOCK TABLES

This article will show you how to solve the following problem:if(typeof __ez_fad_position != ‘undefined’){__ez_fad_position(‘div-gpt-ad-howtoforge_com-box-3-0’)};

Error: MySQL - mysqldump: Got error: 1016: Can't open file: './exampledb/xxx.frm' (errno: 24) when using LOCK TABLES

This issue can happen when you try to create a MySQL database dump with the mysqldump command on Linux:

mysqldump -u root -pmysecretpassword --opt exampledb > exampledb.sql
[email protected]:/tmp/mysql# mysqldump -u root -pmysecretpassword --opt exampledb > exampledb.sql
mysqldump: Got error: 1016: Can't open file: './exampledb/xxx.frm' (errno: 24) when using LOCK TABLES
[email protected]:/tmp/mysql#

 

Add the option –lock-tables=false to the mysqldump command as shown below:

mysqldump -u root -pmysecretpassword --opt exampledb --lock-tables=false > exampledb.sql

This will fix the issue.

About the Author

Leave a Reply