Title: MySQL error while importing database: Incorrect key file
Last modified: August 20, 2016

---

# MySQL error while importing database: Incorrect key file

 *  [Jack](https://wordpress.org/support/users/moxie/)
 * (@moxie)
 * [15 years ago](https://wordpress.org/support/topic/mysql-error-while-importing-database-incorrect-key-file/)
 * I epxorted my MySQL 4 database and now want to import it into my MySQL 5 database.
   I used phpmyadmin to do so, following the instructions on wordpress.org, but 
   each time I get this error:
 * INSERT INTO `wp_posts` (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`,`
   post_title`, `post_category`, `post_excerpt`, `post_lat`, `post_lon`, `post_status`,`
   comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`,`
   post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `
   guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`) VALUES (
   294, 3, ‘2004-09-03 23:13:59’, ‘2004-09-03 21:13:59’, ‘<img src=”[http://www.spoenk.nl/archives/200409/spaarwatt.gif&#8221](http://www.spoenk.nl/archives/200409/spaarwatt.gif&#8221);
   alt=”Sparen voor watt?” title=”Sparen voor watt?”/>Een week geleden was er de
   aankondiging, een officiële website was al in de lucht, en vandaag kregen we 
   dan hoogstpersoonlijk bericht over ”[Spaarwatt](http://www.spaarwatt.nl): het
   nieuwe spaar- en service programma voor in en om het huis. Essent en [@home](https://wordpress.org/support/users/home/)
   geven met Spaarwatt iets extra”s aan u als klant.” \r\n\r\nMooi, dacht ik aanvankelijk,
   ze gaan iets ondernemen om mensen weer eens bewuster te[…]
 * MySQL retourneerde: Documentatie
    #126 – Incorrect key file for table ‘./spoenkje/
   wp_posts.MYI’; try to repair it

Viewing 1 replies (of 1 total)

 *  Thread Starter [Jack](https://wordpress.org/support/users/moxie/)
 * (@moxie)
 * [15 years ago](https://wordpress.org/support/topic/mysql-error-while-importing-database-incorrect-key-file/#post-2117220)
 * I think I solved it. I used the table repair function several times, but that
   didn’t help. Then I saw one table, the wp_options table, that had some bytes 
   overhead. So I did a repair only on that table. Then exported the version 4 database
   and imported it in version 5, and that worked.
    Strange though, why it didn’t
   work in the first place when I selected ALL of the tables and did a repair on
   them…

Viewing 1 replies (of 1 total)

The topic ‘MySQL error while importing database: Incorrect key file’ is closed to
new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [phpadmin](https://wordpress.org/support/topic-tag/phpadmin/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Jack](https://wordpress.org/support/users/moxie/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/mysql-error-while-importing-database-incorrect-key-file/#post-2117220)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
