MySQL执行语句报Incorrect key file for table '/tmp/#sql_.MYI'; try to repair it

MySQL执行语句报Incorrect key file for table '/tmp/#sql_4c80_0.MYI'; try to repair it


报错原因:

数据库的临时目录tmpdir满了,导致临时表创建不成功。

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      105G   105G   0G  100% /


解决方法:

清理临时目录,释放空间。