Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Location
    Amarillo, Tx
    Posts
    1,504
    Plugin Contributions
    0

    Default Error importing old database to the new database

    after I install the new version to the new database.

    I import the old database to the new database I got this error:

    Error
    SQL query:

    --
    -- Dumping data for table `address_format`
    --
    INSERT INTO `address_format` ( `address_format_id` , `address_format` , `address_summary` )
    VALUES ( 1, '$firstname $lastname$cr$streets$cr$city, $postcode$cr$statecomma$country', '$city / $country' ) , ( 2, '$firstname $lastname$cr$streets$cr$city, $state $postcode$cr$country', '$city, $state / $country' ) , ( 3, '$firstname $lastname$cr$streets$cr$city$cr$postcode - $statecomma$country', '$state / $country' ) , ( 4, '$firstname $lastname$cr$streets$cr$city ($postcode)$cr$country', '$postcode / $country' ) , ( 5, '$firstname $lastname$cr$streets$cr$postcode $city$cr$country', '$city / $country' ) , ( 6, '$firstname $lastname$cr$streets$cr$city$cr$state$cr$postcode$cr$country', '$postcode / $country' ) ;



    MySQL said:

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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Error importing old database to the new database

    When you made your backup you didn't include the option to "DROP TABLES" as part of your settings.
    Thus, your import is attempting to duplicate the entries already in the database.

    From the Tutorials:
    3. On your OLD host, Make a COMPLETE backup of your DATABASE and STORE.
    a. Use either the "Backup MySQL Database" contribution to do the backup of your database, or use phpMyAdmin to export your entire database ... include the "DROP" tables command, and under Data, choose "Complete Inserts" and "Extended Inserts".
    Save the SQL file to your PC for later.
    Click here for tips on using phpMyAdmin to export database.
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

 

 

Similar Threads

  1. v139h Problem Importing SQL database to new database ready for testing Zencart 1.5
    By gillpotsoffun in forum Upgrading to 1.5.x
    Replies: 8
    Last Post: 24 Aug 2015, 11:24 PM
  2. Trouble importing old database
    By countingsheep in forum Installing on a Windows Server
    Replies: 11
    Last Post: 12 Oct 2011, 05:37 AM
  3. Replies: 4
    Last Post: 15 Oct 2010, 07:18 AM
  4. Error Importing Old Database
    By brikat in forum General Questions
    Replies: 1
    Last Post: 2 May 2008, 11:27 PM
  5. Importing Old Database?
    By powerline5 in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 7 Mar 2007, 05:34 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR