Title: Error importing database over existing database
Last modified: August 20, 2016

---

# Error importing database over existing database

 *  Resolved [karikirch](https://wordpress.org/support/users/karikirch/)
 * (@karikirch)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-importing-database-over-existing-database/)
 * Hi
    I received the following error while importing a backup of my database. I
   am importing this database and hoping to overwrite the current one.
 *     ```
       Error
       SQL query:
   
       --
       -- Dumping data for table <code>db_bids</code>
       --
       INSERT INTO  <code>db_bids</code> (  <code>id</code> ,  <code>price_from</code> ,  <code>price_to</code> ,  <code>amount</code> ,  <code>price_from1</code> ,  <code>price_to1</code> ,  <code>amount1</code> ,  <code>price_from2</code> ,  <code>price_to2</code> ,  <code>amount2</code> )
       VALUES ( 10, 0, 1000, 0, 1000, 10000, 0, 10000, 10000000, 0 ) ;
   
       MySQL said: 
   
       #1062 - Duplicate entry '10' for key 1
       ```
   
 * Any pointers would be great.

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

 *  [pete_398](https://wordpress.org/support/users/pete_398/)
 * (@pete_398)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-importing-database-over-existing-database/#post-3420675)
 * You will have to empty the database first. However, I would take a backup before
   importing.
 *  Thread Starter [karikirch](https://wordpress.org/support/users/karikirch/)
 * (@karikirch)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-importing-database-over-existing-database/#post-3420679)
 * Thanks for that. That worked.
    However, now that I have imported my backup DB
   it says “You do not have sufficient permissions to access this page.” when trying
   to log in to wp-admin. Is there a way I can check user privileges?
 *  [pete_398](https://wordpress.org/support/users/pete_398/)
 * (@pete_398)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-importing-database-over-existing-database/#post-3420818)
 * That message is comping from menu.php in the admin path ..
 *     ```
       if ( !user_can_access_admin_page() ) {
       	do_action('admin_page_access_denied');
       	wp_die( __('You do not have sufficient permissions to access this page.') );
       }
       ```
   
 * So, you need to use an admin username and password to login to admin. If you 
   have forgotten it, it will be in the table ***_wp_users , column name user_login
 *  Thread Starter [karikirch](https://wordpress.org/support/users/karikirch/)
 * (@karikirch)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/error-importing-database-over-existing-database/#post-3420819)
 * Pete_398 – sorted. Thanks. I had started going down that road and realised something
   had changed with admin user_login. Have now changed it in the table.

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [karikirch](https://wordpress.org/support/users/karikirch/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/error-importing-database-over-existing-database/#post-3420819)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
