Support » Fixing WordPress » Error importing database over existing database

  • Resolved karikirch

    (@karikirch)


    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)
  • You will have to empty the database first. However, I would take a backup before importing.

    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?

    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

    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.