Title: Fixing sql #1062 duplicate content error
Last modified: August 21, 2016

---

# Fixing sql #1062 duplicate content error

 *  [pvijeh](https://wordpress.org/support/users/pvijeh/)
 * (@pvijeh)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/fixing-sql-1062-duplicate-content-error/)
 * Hello,
 * I am trying to upload one of my site’s sql databases using phpmyadmin– however
   i get the following error:
 * #1062 – Duplicate entry ‘153’ for key ‘id’
 * Does anyone know how to solve this error?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/fixing-sql-1062-duplicate-content-error/#post-4384857)
 * Yes, it’s quite easy – but can be a bit scary.
 * Any time that you’re restoring like that, you need to delete any existing database
   tables that you’ll be importing. The import creats everything itself, so the 
   database needs to be empty before you start.
 *  Thread Starter [pvijeh](https://wordpress.org/support/users/pvijeh/)
 * (@pvijeh)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/fixing-sql-1062-duplicate-content-error/#post-4384876)
 * Hey Catacaustic,
 * thanks for the reply.
 * I should have mentioned that I am trying to upload to a new blank database.
 * — dig the cat photo btw.
 * Anyone else got some ideas?
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/fixing-sql-1062-duplicate-content-error/#post-4384877)
 * OK, so does the error give you any more information? Most times the error message
   will include a line of where the error has occured.
 * If that’s not there you can manually go through the SQL dump file and find everything
   with an ID of 153 and see if there’s any overlap in the tables anywhere. There
   could be if there was some error in the export process, so it’s worth a look.
 *  Thread Starter [pvijeh](https://wordpress.org/support/users/pvijeh/)
 * (@pvijeh)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/fixing-sql-1062-duplicate-content-error/#post-4384880)
 * Hey thanks a lot for the help- i appreciate it.
 * this is what phpmyadmin spits out:
 * ——————————————————
 * SQL query:
 * — — Dumping data for table `wp_nxs_log` — INSERT INTO `wp_nxs_log` (`id`, `date`,`
   act`, `nt`, `type`, `msg`, `extInfo`) VALUES (153, ‘2013-11-01 16:39:11’, ‘Scheduled’,‘
   Twitter (moving to new york)’, ‘BI’, ‘ PostID:(3078)’, ”), (154, ‘2013-11-01 
   16:39:35’, ‘Posted’, ‘<span style=”color:#014A76″>Plurk</span> – moving to new
   york’, ‘S’, ‘OK – Message Posted ‘, ‘ | PostID: 3078 – Is This New York”s Smallest
   Apartment? ‘), (155, ‘2013-11-01 16:39:36’, ‘Posted’, ‘<span style=”color:#014A76″
   >Tumblr</span> – moving to new york tumblr’, ‘S’, ‘OK – Message Posted ‘, ‘ |
   PostID: 3078 – Is This New York”s Smallest Apartment? |im’), (156, ‘2013-11-01
   16:39:37’, ‘Posted’, ‘<span style=”color:#00FFFF”>Twitter</span> – moving to 
   new york’, ‘S’, ‘OK – Message Posted ‘, ”), (157, ‘2013-11-01 16:39:44’, ‘Posted’,‘
   <span style=”color:#000080″>StumbleUpon</span> – moving to new york’, ‘S’, ‘OK–
   Message Posted ‘, ‘ | PostID: 3078 – Is This New York”s Smallest Apartment? ‘),(
   158, ‘2013-11[…]
 * MySQL said: Documentation
 * #1062 – Duplicate entry ‘153’ for key ‘id’
 * ————————————————-
 * i have tried to go through the sql file and delete some stuff in a text editor–
   but i have not gotten that to work so far. I am not really sure what i should
   be deleting and what i should leave alone.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Fixing sql #1062 duplicate content error’ is closed to new replies.

## Tags

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

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 4 replies
 * 2 participants
 * Last reply from: [pvijeh](https://wordpress.org/support/users/pvijeh/)
 * Last activity: [12 years, 6 months ago](https://wordpress.org/support/topic/fixing-sql-1062-duplicate-content-error/#post-4384880)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
