Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I keep seeing this pop up in my logs every few hours.

Trying to get property of non-object -- Incorrect key file for table '/tmp/#sql_ad2_2.MYI'; try to repair it

I ran mysqlcheck on all tables, but I still get it. Is there anything else I can do?

share|improve this question
up vote 0 down vote accepted

the key file error you're getting is on a temporary table or a table being rebuilt. You might check your processlist to see if you have some very large query running that is trying to do a create temporary table select * from something;

Since it is a /tmp table, it should be removed when the thread that created it terminates. When the logs pop up, is it the same filename? or a different filename? Is it possible that /tmp is not set chmod 1777 ? or are there files there that mysql created that don't have the correct uid:gid?

share|improve this answer
I suspected it was a temp table, but I just couldn't figure out why. /tmp/ is 777. Is it possible this is an innodb bug? – Ian Jun 24 '10 at 2:59
.MYI is a MyISAM file. I'm wondering if you have something running mysqlcheck on a cron job, and it just happens to hit an old tmp file that was abandoned. What is the date on that file, is it recent? – karmawhore Jun 24 '10 at 3:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.