Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you fix a MySQL "Incorrect key file" error when you can't repair the table?

I'm trying to run a rather large query that is supposed to run nightly to populate a table. I'm getting an error saying Incorrect key file for table '/var/tmp/#sql_201e_0.MYI'; try to repair it but the storage engine I'm using (whatever the default is, I guess?) doesn't support repairing tables.

how do I fix this so I can run the query?

like image 975
Wayne Molina Avatar asked Mar 11 '10 21:03

Wayne Molina


People also ask

What is MySQL error?

Lost connection to MySQL server Network conditions should be checked if this is a frequent error. If an error message like “Lost connection to MySQL server” appears while querying the database, it is certain that the error has occurred because of network connection issues.


1 Answers

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.

like image 123
marknt15 Avatar answered Sep 22 '22 10:09

marknt15