Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2007
    Posts
    104
    Plugin Contributions
    0

    Default database transfer problems

    I am trying to transfer my database from one server to another, and I followed all of the instructions for exporting your database and importing it to the new server. When I try to import it to the new server, I get this error:

    SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"

    Help please!

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

    Default Re: database transfer problems

    Do you know the mysql version of your old host and the version of the new?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jun 2006
    Location
    Koh Samui
    Posts
    122
    Plugin Contributions
    0

    Default Re: database transfer problems

    Hi,

    Not sure if it will help you but this is what the manual states:

    NO_AUTO_VALUE_ON_ZERO

    NO_AUTO_VALUE_ON_ZERO affects handling of AUTO_INCREMENT columns. Normally, you generate the next sequence number for the column by inserting either NULL or 0 into it. NO_AUTO_VALUE_ON_ZERO suppresses this behavior for 0 so that only NULL generates the next sequence number.

    This mode can be useful if 0 has been stored in a table's AUTO_INCREMENT column. (Storing 0 is not a recommended practice, by the way.) For example, if you dump the table with mysqldump and then reload it, MySQL normally generates new sequence numbers when it encounters the 0 values, resulting in a table with contents different from the one that was dumped. Enabling NO_AUTO_VALUE_ON_ZERO before reloading the dump file solves this problem. mysqldump now automatically includes in its output a statement that enables NO_AUTO_VALUE_ON_ZERO, to avoid this problem.
    Ronald.
    [FONT="Verdana"]http://www.xlventures.eu[/FONT]

  4. #4
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: database transfer problems

    It's not uncommon for an export/import from MySQL 3.23 to v4.x to lose all the auto-increment settings.
    You may need to re-export your old database and specifically tell it to include auto-increment values. I believe that's done via a simple checkbox in phpMyAdmin. Or perhaps it's done via a v4-compatibility checkbox.
    .

    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.

  5. #5
    Join Date
    Feb 2007
    Posts
    104
    Plugin Contributions
    0

    Default Re: database transfer problems

    Quote Originally Posted by kobra View Post
    Do you know the mysql version of your old host and the version of the new?
    Old: 4.1.22
    New: 4.0

  6. #6
    Join Date
    Jan 2004
    Posts
    66,444
    Plugin Contributions
    279

    Default Re: database transfer problems

    There's a fix-auto-increments.sql file in the zc_install/sql folder of your Zen Cart files, which "might" be a help to you if you cannot re-export with the auto-increment and/or compability options and then re-import.
    .

    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. Database Transfer Question
    By amandavz in forum General Questions
    Replies: 4
    Last Post: 10 Jan 2011, 10:31 AM
  2. Database Transfer!?
    By hyperlite635 in forum Installing on a Linux/Unix Server
    Replies: 1
    Last Post: 7 Feb 2008, 04:19 AM
  3. transfer problems
    By yitzchak23 in forum General Questions
    Replies: 3
    Last Post: 4 Jul 2007, 10:59 AM
  4. Transfer of Database & Webhost
    By friends1976 in forum General Questions
    Replies: 5
    Last Post: 4 Apr 2007, 07:14 PM

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