How do you fix a MySQL “Incorrect key file” error when you can’t repair the table?
You must change the location of MySQL’s temporary folder which is ‘/tmp’ in most cases to a location with a bigger disk space. Change it in MySQL’s config file. Basically your server is running out of disk space where /tmp is located.