ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Importing MySQL data to new installation, Error #1062

December 07, 2009 4:07pm

Subscribe [2]
  • #1 / Dec 07, 2009 4:07pm

    jayferranti

    6 posts

    Hello,

    Brand new to EE. I’ve converted about 80 percent of a client website to EE using the core version on a testing server, very happy with the product so far.

    I am using EE version 1.6.8

    The Commercial license version installed successfully on the production server where the site will be hosted.

    I exported the DB from the core version, hoping to import all that work into the licensed version DB, but it stops at the first table with this error:

    #1062 - Duplicate entry ‘1’ for key ‘PRIMARY’

    SQL query:

    --
    -- Dumping data for table `exp_actions`
    --
    INSERT INTO `exp_actions` ( `action_id` , `class` , `method` ) 
    VALUES ( 1, 'Comment', 'insert_new_comment' ) , ( 2, 'Comment_CP', 'delete_comment_notification' ) , ( 3, 'Mailinglist', 'insert_new_email' ) , ( 4, 'Mailinglist', 'authorize_email' ) , ( 5, 'Mailinglist', 'unsubscribe' ) , ( 6, 'Member', 'registration_form' ) , ( 7, 'Member', 'register_member' ) , ( 8, 'Member', 'activate_member' ) , ( 9, 'Member', 'member_login' ) , ( 10, 'Member', 'member_logout' ) , ( 11, 'Member', 'retrieve_password' ) , ( 12, 'Member', 'reset_password' ) , ( 13, 'Member', 'send_member_email' ) , ( 14, 'Member', 'update_un_pw' ) , ( 15, 'Member', 'member_search' ) , ( 16, 'Member', 'member_delete' ) , ( 17, 'Trackback_CP', 'receive_trackback' ) , ( 18, 'Weblog', 'insert_new_entry' ) , ( 19, 'Search', 'do_search' ) ;


    MySQL said: 

    #1062 - Duplicate entry '1' for key 'PRIMARY'

    Would appreciate any helpful response or ideas.

    Thanks,

    Jay

  • #2 / Dec 07, 2009 4:15pm

    Ingmar

    29245 posts

    exp_actions.action_id is set to auto_increment. Leave out the id, it will be created automatically.

  • #3 / Dec 07, 2009 4:26pm

    jayferranti

    6 posts

    I don’t follow. Can you be more specific? I don’t know how to “leave out the id”. I used phpMyAdmin to produce the export to expressionengine.sql

    I tried unchecking the box for “auto_increment” when I exported it, then tried to import again, but got the same error.

  • #4 / Dec 07, 2009 4:32pm

    Ingmar

    29245 posts

    Try to have your SQL along these lines:

    INSERT INTO `exp_actions` ( `class` , `method` ) VALUES ('Foobar', 'do_the_foobar' )

    ie, don’t have an action_id, MySQL will take care of that.

  • #5 / Dec 07, 2009 4:47pm

    jayferranti

    6 posts

    You’re assuming I have knowledge that I don’t have. I don’t know how to write these instructions, all I know how to do is hit the import tab and either select or deselect the boxes.

  • #6 / Dec 07, 2009 5:36pm

    Ingmar

    29245 posts

    I am sorry, I don’t know how to explain it differently. I have tried to insert your SQL into my database, and it worked perfectly. Perhaps somebody can help you with the import?

  • #7 / Dec 08, 2009 9:07am

    jayferranti

    6 posts

    I was able to resolve the situation by creating a completely empty database (no tables) and importing my data into that. I edited the config.php to go to the new database. Although the paths were wrong and I had no CSS or images, I was able to go into the General Config and change the entries to the production server values.

  • #8 / Dec 08, 2009 3:03pm

    Ingmar

    29245 posts

    I am very glad to see you were able to solve this. Please don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases