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:

3 Comment(s)

Add comment

Comments

From: Pintor at: 2012-04-10 03:02:31

Great, is works fine.

From: lokeshjain2008 at: 2013-08-16 07:25:07

Thanks man! this helped me today.

 

From: Anonymous at: 2014-08-06 11:32:58

Great its worked for me