• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
The Electric Toolbox Blog

The Electric Toolbox Blog

Linux, Apache, Nginx, MySQL, Javascript and PHP articles

  • Applications
  • FCKEditor
  • Apache
  • Windows
  • Contact Us
Home / Article / MySql / MySQL “Incorrect key file for table /tmp/#sql_xxx_x.MYI” error

MySQL “Incorrect key file for table /tmp/#sql_xxx_x.MYI” error

I’ve written a post in the past about dealing with the “Incorrect key file for table” in MySQL for regular database tables, but there are instances when you might get the error for a temporary table and see something like this: “Incorrect key file for table ‘/tmp/#sql_xxx_x.MYI’; try to repair it”

It’s a temporary table, so you can’t repair it

The solution would normally be to run “REPAIR TABLE tablename” but in this case you can’t repair it because it’s a temporary file, and if you look for it you won’t find it.

You’ve run out of disk space

The reason for an error like this is because there isn’t enough disk space left on the partition where the temporary file would be written. Presumably MySQL has started to write data out to the file but then the disk space runs out, and that’s when it errors out.

The simple solution is to check your disk space, and make sure there is enough free space by freeing some up.

In my case today, I discovered there was only about 100MB of space left on a fairly busy server, so I needed to compress and/or delete some old log files and backup files.

Check Out These Related posts:

  1. MySQL utility commands
  2. How to shrink a VMWare Fusion Linux virtual disk
  3. MySQL “Incorrect key file for table” error
  4. Copy a table in MySQL with CREATE TABLE LIKE

Filed Under: MySql

Primary Sidebar

Categories

  • Apache
  • Applications
  • Article
  • Case Studies
  • Email Servers
  • FCKEditor
  • HTML And CSS
  • Javascript
  • Linux/Unix/BSD
  • Microsoft SQL Server
  • Miscellaneous Postings
  • MySql
  • Networking
  • Nginx Web Server
  • Offsite Articles
  • OSX
  • PHP
  • Quick Tips
  • RFC – Request for Comments
  • SilverStripe
  • VMWare
  • VPN
  • Windows
  • WordPress

Recent Posts

  • Vim Show Line Numbers
  • Add User To Group Linux
  • Chmod 777 Tutorial
  • How to Copy Directory Linux
  • Linux create user

Copyright © 2021. ElectricToolBox. All Rights Reserved.

  • Contact Us
  • Copyright Info
  • Privacy Policy
  • Sitemap