MySQL: #126 - Incorrect key file for table

前端 未结 17 1948
臣服心动
臣服心动 2020-11-29 02:18

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

17条回答
  •  甜味超标
    2020-11-29 02:41

    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.

提交回复
热议问题