I got the following error from a MySQL query.
#126 - Incorrect key file for table
I have not even declared a key for this table, but I do have i
I know that this is an old topic but none of the solution mentioned worked for me. I have done something else that worked:
You need to:
Try to run a repair command for each one of the tables involved in the query.
Use MySQL administrator, go to Catalog -> Select your Catalog -> Select a table -> Click the Maintenance button -> Repair -> Use FRM.
Following these instructions allowed me to recreate my tmp directory and fix the issue:
Display all file systems and their disk usage in human readable form:
df -h
Find the processes that have files open in /tmp
sudo lsof /tmp/**/*
Then umount /tmp
and /var/tmp
:
umount -l /tmp
umount -l /var/tmp
Then remove the corrupt partition file:
rm -fv /usr/tmpDSK
Then create a nice new one:
/scripts/securetmp
Note that by editing the securetmp Perl script you can manually set the size of the tmp directory yourself, however just running the script increased the size of the tmp directory on our server from roughly 450MB to 4.0GB.
mysqlcheck -r -f -uroot -p --use_frm db_name
will normally do the trick
Try to use limit in your query. It's because of full disk as said by @Monsters X.
I have also faced this problem and solved by limit in query, because the thousands of records were there. Now working good :)
I got this error when I set ft_min_word_len = 2
in my.cnf
, which lowers the minimum word length in a full text index to 2, from the default of 4.
Repairing the table fixed the problem.