Question

I have a site built on top of Wordpress 3.7.1. Using a plugin I do a DB backup but then when I try to import that DB at development server I get this error:

ERROR 1062 (23000) at line 9480: Duplicate entry '2280' for key 'PRIMARY'

How is that possible? I mean how in DB duplicates can exists? How I can fix this?

Was it helpful?

Solution

The problem seems to be in the way you created your development server. Please follow this steps:

  1. Login to your local "phpMyAdmin" to export your private CMS database.
  2. Replace each old URL address with the new domain address.
  3. Create a new database for your development server
  4. Login to the "phpMyAdmin" for your new database. Under the "Import" tab, select the file you just downloaded, changed and saved.

OTHER TIPS

How does your backup look like? I suspect it being a sequence of INSERTs. When you development server already has an old dump imported, the old and new values will be in conflict. You should drop the old database and recreate it from scratch.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top