WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Error importing database over existing database (5 posts)

  1. karikirch
    Member
    Posted 1 year ago #

    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.

  2. pete_398
    Member
    Posted 1 year ago #

    You will have to empty the database first. However, I would take a backup before importing.

  3. karikirch
    Member
    Posted 1 year ago #

    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?

  4. pete_398
    Member
    Posted 1 year ago #

    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

  5. karikirch
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic