Results 1 to 8 of 8
  1. #1
    Join Date
    Jan 2011
    Location
    Adelaide, Australia
    Posts
    1,670
    Plugin Contributions
    1

    Default v1.5.1 upgrade to v1.5.5a Data Base UPGRADE issue

    Upgrading 2 sites from 1.5.1 to 1.5.5a - have created a new folders in existing sites with fresh install of 1.5.5a - having issues when importing existing DB into fresh install in both upgrades. Using cPanel..... AND .... cannot find a way to upgrade DB after importing DB

    *** there appears not to be any facility to upgrade the installation database after importing existing DB - in previous updates I have done from 1.3.9h to 1.5.1 after importing database would re-run zc_install and select 'update data base only' tab - in re-running zc_install in 1.5.5a after importing database I get a 'clean install' tab only with warning all data will be erased, so hence do not attempt clean install. Is there another process for DB UPGRADE?? ****

    this is what I have encountered / been doing
    1. in both cases at initial upload I get this error #1062 - Duplicate entry '1' for key 'PRIMARY' - I really need to know what I should do in such cases? ignore? delete the file? re-export? I have tried all but no joy except in deleting until message disappears (eventually) including on previous upgrades
    2. for one site I have re-done the whole upgrade folder, i.e. deleted folder, created a new folder (different name), created a new database, installed successfully fresh 1.5.5a and continually had the same problem - I did this whole process 3 times and no joy
    3. Finally, in continued attempts at upgrading both sites I re-export existing database and re-import (a number of times) and in one instance finally get the green light saying successful upload but there is still heaps of data missing, importantly customer and product tables

    I know nothing about data bases.

    Pulling my hair out here - appreciate any assistance.

    cheers, Mike

  2. #2
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: v1.5.1 upgrade to v1.5.5a Data Base UPGRADE issue

    so, after installing a clean fresh 1.5.5a you are going into the DB for that 1.5.5a and dropping all of the tables so the database exists but is completely empty? Then you are importing the 1.5.1 DB into that empty database and then running zc_install?
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

  3. #3
    Join Date
    Jan 2011
    Location
    Adelaide, Australia
    Posts
    1,670
    Plugin Contributions
    1

    Default Re: v1.5.1 upgrade to v1.5.5a Data Base UPGRADE issue

    Quote Originally Posted by barco57 View Post
    so, after installing a clean fresh 1.5.5a you are going into the DB for that 1.5.5a and dropping all of the tables so the database exists but is completely empty? Then you are importing the 1.5.1 DB into that empty database and then running zc_install?
    Thanks for your response Barco,
    No - fresh 1.5.5a install in new folder and then zc_install (obviously has new blank DB otherwise won't install, so a standard new install - then after install I import existing DB from working site into the new 1.5.5a install DB - which is obviously populated with certain admin data from install.

    Two things are happening, or not happening;
    1. when importing existing DB into new DB not all data is transferring - so this is the first issue to tackle - why is the data not importing? as stated I do get a #1062 - Duplicate entry '1' for key 'PRIMARY' in the ADDRESS BOOK and to be honest I have no idea what to do about that - read above - and of course everything else beyond this doesn't import.
    2. even if the import was fully successful how does one update the DB in the new 1.5.5a install? I have tried running zc_install after DB import and all I get is the 'Clean Install' option - there is no DB upgrade only option

    1. This is happening on two separate installs for two separate site upgrades - both from 1.5.1 to 1.5.5a

    Not having a good understanding of data bases I struggle with how to correct errors as above - I will delete the primary 1 address in the existing original DB and re-export and then will get the same error but this time 'Primary 2' -

    is there a PhP version conflict maybe from 1.5.1 to 1.5.5a?

    when exporting DB via cPanel I just use standard radio button at Quick - not the show all options - in the show all options there are a number of boxes unticked and I have no idea if I should be using that process and if so what boxes to tick - I am not finding much at all in FAQ's regarding exporting and importing Data Bases.

    frustrating to say the least.
    cheers, Mike

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: v1.5.1 upgrade to v1.5.5a Data Base UPGRADE issue

    The problem here is that after the initial temporary install you're not deleting the newly-created temporary database content. Thus your subsequent import is trying to load records that match already-existing record IDs.

    Two solutions:
    a) drop all the tables before importing from the backup
    b) when you do your backup check the checkbox that tells it to include a statement for DROPping the tables before it inserts the data, so that the import file is already prepared (inside) with commands to drop the tables for you.

    Quote Originally Posted by shags38 View Post
    when exporting DB via cPanel I just use standard radio button at Quick - not the show all options - in the show all options there are a number of boxes unticked and I have no idea if I should be using that process and if so what boxes to tick - I am not finding much at all in FAQ's regarding exporting and importing Data Bases.
    This FAQ article may help. It shows how to use phpMyAdmin to do the backup, and which checkboxes to use:
    How can I do a Site Backup? Or use phpMyAdmin to backup my database?

    This upgrade guide contains a link to the FAQ article above, as well as explaining the upgrade process:
    How do I rebuild my site on the new version, instead of upgrading?
    .

    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
    Jan 2011
    Location
    Adelaide, Australia
    Posts
    1,670
    Plugin Contributions
    1

    Default Re: v1.5.1 upgrade to v1.5.5a Data Base UPGRADE issue

    Quote Originally Posted by DrByte View Post
    The problem here is that after the initial temporary install you're not deleting the newly-created temporary database content. Thus your subsequent import is trying to load records that match already-existing record IDs.

    Two solutions:
    a) drop all the tables before importing from the backup
    b) when you do your backup check the checkbox that tells it to include a statement for DROPping the tables before it inserts the data, so that the import file is already prepared (inside) with commands to drop the tables for you.



    This FAQ article may help. It shows how to use phpMyAdmin to do the backup, and which checkboxes to use:
    How can I do a Site Backup? Or use phpMyAdmin to backup my database?

    This upgrade guide contains a link to the FAQ article above, as well as explaining the upgrade process:
    How do I rebuild my site on the new version, instead of upgrading?
    Thank You [QUOTE=DrByte;1318975] - deleting all populated tables and then importing copied DB worked a treat.

    So please explain a couple of things here - for previous upgrades I have never had to follow this procedure, it was re-run zc_install and then select DataBase Upgrade - did this process actually delete all tables in the background and then load imported DB? doing the same thing that is now done manually? I don't recall seeing this new process in any of the FAQ's - however all is good now.

    Your database appears to need patching to a higher level. See Tools->Server Information to review patch levels.
    ** do I need to contact my host with this info asking them to upgrade PhP version?

    ** does it really matter whether one installs the required plugins into the new upgraded version before upgrading DB or after? (I am yet to install the plugins to match old version so it will be after)

    cheers and thanks again, Mike
    Last edited by shags38; 23 Sep 2016 at 06:47 AM.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: v1.5.1 upgrade to v1.5.5a Data Base UPGRADE issue

    1. No, this is not new. You STILL need to run zc_install and select Database Upgrade.
    I suppose all this export/import stuff is something you "skipped" previously, and just did everything directly on your live site, and took your chances at busting it. The ONLY purpose of setting up a test copy of your site and doing the export+import is to TEST (prepare) the upgrade, so that you can sort out any bugs you cause by missing things, so that when you actually DO do it directly on your live site you have no surprises and have potentially only 5 minutes down-time instead of 5 days because you didn't sort things out ahead of time.

    2. The "your database appears to need patching" is exactly this same thing. You haven't run zc_install to upgrade the imported OLD database contents on your temporary test store.

    3. I'm not sure where you're getting the idea of upgrading the PHP version.
    While it's good to move to the latest compatible version, there's nothing in Zen Cart that'd be telling you to do that. The message above said "database", not "php".
    .

    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.

  7. #7
    Join Date
    Jan 2011
    Location
    Adelaide, Australia
    Posts
    1,670
    Plugin Contributions
    1

    Default Re: v1.5.1 upgrade to v1.5.5a Data Base UPGRADE issue

    Quote Originally Posted by DrByte View Post
    1. No, this is not new. You STILL need to run zc_install and select Database Upgrade.
    I suppose all this export/import stuff is something you "skipped" previously, and just did everything directly on your live site, and took your chances at busting it. The ONLY purpose of setting up a test copy of your site and doing the export+import is to TEST (prepare) the upgrade, so that you can sort out any bugs you cause by missing things, so that when you actually DO do it directly on your live site you have no surprises and have potentially only 5 minutes down-time instead of 5 days because you didn't sort things out ahead of time.

    2. The "your database appears to need patching" is exactly this same thing. You haven't run zc_install to upgrade the imported OLD database contents on your temporary test store.

    3. I'm not sure where you're getting the idea of upgrading the PHP version.
    While it's good to move to the latest compatible version, there's nothing in Zen Cart that'd be telling you to do that. The message above said "database", not "php".
    Doc I have not done any of this on a live site nor have I done so in the past - it is all being done in a test folder for the reason of testing before going live as the updated version.
    I have used the procedures previously for 1.3.9h to 1.5.1. however I guess the error on my part this time round was not electing the 'drop tables' command in the exporting of the DB which caused all this fuss - hard lesson learned. Before I upgrade again I will take 5 minutes out to refresh my knowledge of the process so I do not miss a vital step again.
    The problem was solved by following your instructions and deleting populated tables and re-importing - for which I am grateful.
    The comments about being a new process and the PhP upgrade thing were unfortunate misinterpretation and frustration on the back of what has been a frustrating two days trying to achieve something that should have taken but a few minutes ..... all my fault.

    Cheers, Mike

  8. #8
    Join Date
    Apr 2006
    Location
    West Salem, IL
    Posts
    2,748
    Plugin Contributions
    0

    Default Re: v1.5.1 upgrade to v1.5.5a Data Base UPGRADE issue

    The docs don't specifically say to drop the tables before importing, they just say "Restore your database from the backup in step #1 earlier into your NEW database just created." I suppose it is assumed that you'll drop the contents of the new database before restoring the old because you will get exactly what you got, errors.
    Mike
    GeekHost - Zen Cart Certified & PCI Compliant Hosting
    The Zen Cart Forum...Better than a monitor covered with post-it notes!

 

 

Similar Threads

  1. v151 data base upgrade
    By david52 in forum General Questions
    Replies: 9
    Last Post: 29 Jul 2014, 06:58 PM
  2. upgrade data base issue
    By musicfreer in forum Upgrading from 1.3.x to 1.3.9
    Replies: 3
    Last Post: 9 Jan 2011, 02:56 PM
  3. Data base upgrade
    By IFEELFROOSH in forum Upgrading from 1.3.x to 1.3.9
    Replies: 12
    Last Post: 7 Jan 2009, 04:17 AM

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