Title: Error importing SQL database
Last modified: August 21, 2016

---

# Error importing SQL database

 *  [dpearce04](https://wordpress.org/support/users/dpearce04/)
 * (@dpearce04)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/error-importing-sql-database/)
 * Hi, I’m trying to import a database from a different wordpress site into a brand
   new install. I’m switching hosting and my previous hosting provider sent me the
   SQL file. When I go into phpMyAdmin and try to import the file into my new database
   I get this error:
 * >  SQL query:
   > — — Dumping data for table `wp_commentmeta` — INSERT INTO `wp_commentmeta` (`
   > meta_id`, `comment_id`, `meta_key`, `meta_value`) VALUES (367, 282, ‘akismet_result’,‘
   > false’), (368, 282, ‘akismet_history’, ‘a:4:{s:4:”time”;s:12:”1301706191.4″;
   > s:7:”message”;s:28:”Akismet cleared this comment”;s:5:”event”;s:9:”check-ham”;
   > s:4:”user”;s:0:””;}’), (724, 405, ‘akismet_history’, ‘a:4:{s:4:”time”;s:13:”
   > 1308931032.23″;s:7:”message”;s:49:”Cherylanne changed the comment status to
   > approved”;s:5:”event”;s:15:”status-approved”;s:4:”user”;s:10:”Cherylanne”;}’),(
   > 721, 405, ‘akismet_result’, ‘false’), (722, 405, ‘akismet_history’, ‘a:4:{s:
   > 4:”time”;s:13:”1308930838.03″;s:7:”message”;s:28:”Akismet cleared this comment”;
   > s:5:”event”;s:9:”check-ham”;s:4:”user”;s:0:””;}’), (538, 342, ‘akismet_result’,‘
   > false’), (539, 342, ‘akismet_history’, ‘a:4:{s:4:”time”;s:13:”1303232337.04″;
   > s:7:”message”;s:28:”Akismet cleared this comment”;s:5:”event”;s:9:”check-ham”;
   > s:4:”user”;s:0:””;}’), (541, 343, ‘akismet_result’, […]
   > MySQL said: Documentation
   > #1062 – Duplicate entry ‘367’ for key ‘PRIMARY’
 * Does anyone know how to fix this?

The topic ‘Error importing SQL database’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [dpearce04](https://wordpress.org/support/users/dpearce04/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/error-importing-sql-database/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
