0

I am running a mysql query,which after sometime gives me following error:

#126 - Incorrect key file for table '/tmp/#sql_473_3.MYI'; try to repair it

what the above error mean exactly and what are the possible reasons which lead to this error?

R R
  • 2,999
  • 2
  • 24
  • 42
  • read this question's answer I think this will help u http://stackoverflow.com/questions/2011050/mysql-126-incorrect-key-file-for-table?rq=1 – naveen goyal Dec 26 '13 at 06:11

2 Answers2

0

Most probably you have filled your /tmp partition. When you run a query involving more than one JOIN mysql stores some temporary data in /tmp.

If disk space in /tmp partition is not sufficient, mysql gives that (IMHO misleading) error.

Augusto Destrero
  • 4,095
  • 1
  • 23
  • 25
-1

Check if there were no space left on device, cause this create 1MB /tmp partition.

lsof | grep tmp

check what use /tmp, and stop the service

service mysql stop
service vmware-tools stop

then umount /tmp and start services. It should be fine.

Widmo
  • 173
  • 1
  • 1
  • 7