Today, when I wanted to backup my database with mysqldump I run into error I never received before:


mysqldump: Got error: 29: File './sampl/table.MYD' not found (Errcode: 24) when using LOCK TABLES

As it turned out this error simply means that mysql run out of file descriptors when locking tables – and this error happens only if you have many tables in your database (more than open_files_limit in your my.cnf).

It even has been reported as a bug, although it is not. To cure the problem, simply pass

--single-transaction

option to your mysqldump command.

If, however, you are getting this kind of errors during normal database operations – then the only solution is to increase open_files_limit in mysql configuration file.

Hope this saves you some time!

    Trackback

    2 comments untill now

    1. Worked for me. And yes, saved time! : )

    2. Valerio Amendolagine @ 2010-12-19 21:13

      Thanks a lot. It saved me a lot of time!

    Add your comment now