Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default SQL Errors when importing to new database - #1062 - Duplicate entry '3' for key 1

    I am upgrading from
    Zen Cart 1.3.7.1

    Patch: 1::

    Database Patch Level: 1.3.7

    v1.3.6 [2006-12-19 18:41:45] (Fresh Installation)
    And I keep getting errors while importing my database...



    SQL query:
    -- -- Dumping data for table `orders` -- INSERT INTO `orders` (`orders_id`, `customers_id`, `customers_name`, `customers_company`, `customers_street_address`, `customers_suburb`, `customers_city`, `customers_postcode`, `customers_state`, `customers_country`, `customers_telephone`, `customers_email_address`, `customers_address_format_id`, `delivery_name`, `delivery_company`, `delivery_street_address`, `delivery_suburb`, `delivery_city`, `delivery_postcode`, `delivery_state`, `delivery_country`, `delivery_address_format_id`, `billing_name`, `billing_company`, `billing_street_address`, `billing_suburb`, `billing_city`, `billing_postcode`, `billing_state`, `billing_country`, `billing_address_format_id`, `payment_method`, `payment_module_code`, `shipping_method`, `shipping_module_code`, `coupon_code`, `cc_type`, `cc_owner`, `cc_number`, `cc_expires`, `cc_cvv`, `last_modified`, `date_purchased`, `orders_status`, `orders_date_finished`, `currency`, `currency_value`, `order_total`, `order[...]
    MySQL said:
    #1062 - Duplicate entry '3' for key 1


    I had to split the exports up because it was too large to do in one shot. I am not very good at the database/sql stuff, but, I hope I am doing it right.

    My steps so far:
    backup of site and database to my pc.

    created new database and installed new version into its own folder :

    shop/ (OLD)

    shop-new (new)

    changed the configure files in the new folder to point to new database.
    I am now importing files into the new database... and keep getting errors. I Am only half way through the entire database since it is so large.

    Any help/insight will be appreciated. I have several sites to do and this is my first one, sure hope they all dont flow this way.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: SQL Errors when importing to new database

    Are you starting with a proper DB Backup???

    https://www.zen-cart.com/tutorials/i...hp?article=103
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: SQL Errors when importing to new database

    Im not sure on that. What I did was export the old database to notepad and have been copying those files to the new database?

  4. #4
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: SQL Errors when importing to new database - #1062 - Duplicate entry '3' for key 1

    That was the problem. I had followed another set of instructions and it didnt work. Followed those and it went well. Thank you! I have a couple small issues to work out and I will be ready to switch it over. Thanks again!

 

 

Similar Threads

  1. Replies: 6
    Last Post: 13 Feb 2013, 06:35 AM
  2. Error when importing DB - #1062 - Duplicate entry '1' for key 'PRIMARY'
    By CheapStairParts in forum General Questions
    Replies: 0
    Last Post: 5 Jan 2011, 03:10 AM
  3. Replies: 37
    Last Post: 7 Jul 2008, 07:17 PM
  4. SQL Error : 1062 Duplicate entry '0' for key 1
    By Wazoo in forum General Questions
    Replies: 3
    Last Post: 3 May 2007, 02:50 PM
  5. Replies: 1
    Last Post: 19 Jan 2007, 02:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg