This article will show you how to solve the following problem:

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#

 

Solution for the mysqldum error

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.

Share this page:

Suggested articles

5 Comment(s)

Add comment

Comments

By: Pintor

Great, is works fine.

By: lokeshjain2008

Thanks man! this helped me today.

 

By: Anonymous

Great its worked for me

 

By: Luiz Henrique

Thanks, it solved my problem

By: fernando

thanks men!