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

Want to support HowtoForge? Become a subscriber!
 
Submitted by falko (Contact Author) (Forums) on Thu, 2011-08-25 20:34. :: Errors

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


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Wed, 2014-08-06 12:32.

Great its worked for me

 

Submitted by lokeshjain2008 (not registered) on Fri, 2013-08-16 08:25.

Thanks man! this helped me today.

 

Submitted by Pintor (not registered) on Tue, 2012-04-10 04:02.
Great, is works fine.