Today, I wanted to import quite a huge sql-dump, and got this error. What I was using was:

mysql --user=root -p dbName < sqlDumpName.sql

I was pretty sure about dump's integrity, so after receiving "Error 1064" decided to import using source command:

#mysql --user -p
mysql>use dbName;
mysql>source ./sqlDumpName.sql

This time import went through w/o any issues.

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!