MySQL error 24 when dumping data

If you have lots of MySQL databases/tables you may experience the following error when trying to dump your databas(es):

mysqldump: Got error: 1017: Can't find file: './db/sometable.frm' (errno: 24) when using LOCK TABLES

Mysql has an open files limit version 4 and above which defaults to 1024:

mysql> show variables like 'open_files_limit';
+------------------+-------+
| Variable_name    | Value |
+------------------+-------+
| open_files_limit | 2048  |
+------------------+-------+
1 row in set (0.00 sec)

This value will need to be increased in the /etc/my.cnf file in order to dump more tables:

open_files_limit = 2048

Last updated: 16/08/2008