rss

Apr
23

ERROR 126 (HY000): Incorrect key file for table

Posted (Amit) in MySQL on 23-04-2010

2

I had a table with 62 Millions records with total size on disk as 1.2 GB.
What i was doing was joining this table with other table having 80 thousand records.

While running the query the MySQL server showed me an error

ERROR 126 (HY000): Incorrect key file for table

The problem behind thisĀ  was related to the size of the temp directory, there was not enough memory on the drive where the temp directory was located.
SOLUTION
Try to change the location of the MySQL tmp directory to a place where there is lots of space. you can do this by editing the MySQL config file and adding this entry

tmpdir=”/path/to/the/temp/directory”

Share

Comments (2)

Quick and to the point and saved me a ton of time. Thanks for posting!

Amit

Thanks Jeff :)

Post a comment



Amit Yadav is Stephen Fry proof thanks to caching by WP Super Cache