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

You try to create a MySQL database dump and get the following error:

mysqldump -u root -pmysecretpassword --opt exampledb > exampledb.sql

root@server11:/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
root@server1:/tmp/mysql#

 

Solution

Add --lock-tables=false to the mysqldump command:

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

Share this page:

4 Comment(s)

Add comment

Comments

From: Pintor

Great, is works fine.

From: lokeshjain2008

Thanks man! this helped me today.

 

From: Anonymous

Great its worked for me

 

From: Luiz Henrique

Thanks, it solved my problem