Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1
    Join Date
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Trouble importing old database

    relevant info:
    --Most current version of zen cart installed on new server
    ---PHP Version information: 3.4.5
    ---mysql:
    Server: Localhost via UNIX socket
    Server version: 5.0.92-community
    Protocol version: 10---web server
    cpsrvd 11.30.4.6
    MySQL client version: 4.1.22
    PHP extension: mysql
    History: website needs upgraged, but server that it is on, is terrible. My attempt is to set up the site on a new server:

    I am working on a site that is on one of the worst servers I have ever had experience with. I am not even able to get the zc_install to open on the server after loading it because the server has put up a warning.. It took me 3 hours to do a backup of the site and its a small site. Only like 300 products?
    So, we are moving her site to a better server.. and I installed the most current version of zen cart by following the upgrade instructions, but, it keeps stalling on trying to load her old database. I tried breaking the database apart and loading just sections of it at a time and Im getting this error when adding products descriptions:
    [FONT=Courier New]1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[value-1],[value-2],[value-3],[value-4],[value-5],[value-6])[/FONT]
    [FONT=Courier New](13, 1, 'Organic Ju' at line 1[/FONT]

    Can anyone suggest what to do in that case, or can they suggest how to upgrade the database? When I ran the zc_install, it didnt ask about upgrade for database? It just gave me the option to do the install? I cant load the entire database by itself for some reason?

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Trouble importing old database

    Quote Originally Posted by countingsheep View Post
    but, it keeps stalling on trying to load her old database.
    THAT is the problem you must resolve.
    Quote Originally Posted by countingsheep View Post
    I tried breaking the database apart and loading just sections of it at a time and Im getting this error when adding products descriptions:
    [FONT=Courier New]1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[value-1],[value-2],[value-3],[value-4],[value-5],[value-6])[/FONT]
    [FONT=Courier New](13, 1, 'Organic Ju' at line 1[/FONT]
    That suggests you're breaking the statements apart incorrectly.
    .

    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.

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

    Default Re: Trouble importing old database

    Ok, so, based on your info, then my best approach is to break apart the database and load it? Sorry for my uneducated terminology. Just trying to learn is all.

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

    Default Re: Trouble importing old database

    Well, whatever you need to do to reload the data.
    If that means breaking it up into multiple statements, then that's what you'll need to do.

    You could try re-exporting the original database with "Complete Inserts" enabled but "Extended Inserts" turned off. The resulting export file will be much larger, but splitting up inserts will be much simpler.
    .

    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
    Sep 2006
    Posts
    154
    Plugin Contributions
    0

    Default Re: Trouble importing old database

    Thanks, I see where that made a difference but, what does this mean:
    [FONT=Courier New]#1062 - Duplicate entry '1' for key 1[/FONT]
    every section I try gives me that..

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

    Default Re: Trouble importing old database

    Ignore my question I understand what I did now. I installed the cart, and it created a database and I was trying to load the database that had not been updated into it. So, I am creating another database with the old non upgraded database in it and I will run the install again and select the upgrade database option. :) that should work!

  7. #7
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Trouble importing old database

    Sounds like when you make your backup you're not telling it to include the "drop table" statements. And that suggests you've not read this tutorial: https://www.zen-cart.com/tutorials/i...hp?article=103
    .

    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.

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

    Default Re: Trouble importing old database

    You are correct, I did not follow it the last time...

  9. #9
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Trouble importing old database

    The "drop table" line removes the table and all its data. Then the "create table" statement adds the table back. Then the "insert" statements add in data.
    If you've already got data in the table when it attempts to add a record of a matching index/key, you'll get the "duplicate key" error because the table is protecting you from inserting duplicates.
    That's why you should use the "drop table" option ... or manually truncate each table by hand first before you start inserting data.
    .

    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.

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

    Default Re: Trouble importing old database

    I am still struggling with this site... I have attempted to load the entire site as it was on the OLD server to the new one to at least get something functioning, now, I am getting this message:

    1146 Table 'muddkids_nonupgradezc.configuration' doesn't exist
    in:
    [select configuration_key as cfgkey, configuration_value as cfgvalue from configuration]


    the configuration table does exist? I dont know what I did wrong there?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Error importing old database to the new database
    By wmorris in forum Upgrading to 1.5.x
    Replies: 1
    Last Post: 3 Jan 2012, 08:27 AM
  2. Replies: 4
    Last Post: 15 Oct 2010, 07:18 AM
  3. Having trouble importing my database
    By pharry in forum Installing on a Linux/Unix Server
    Replies: 2
    Last Post: 22 Jun 2009, 11:14 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

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