Forums / Upgrading to 1.5.x / Trouble updating database

Trouble updating database

Started by nwce on 12 Mar 2015, 10:00 PM · Views: 2,130

Results 21 to 27 of 27
15 Mar 2015, 5:16 PM
#21
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Trouble updating database

In phpMyAdmin, have you tried going to the LIVE database and click on OPERATIONS tab and do a Copy with structure and data to the NEW test database?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Mar 2015, 5:26 PM
#22
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Hi Ajeh,

Thanks for your reply. No I have not tried this, I have not done this before. I will give it a try!

Thanks for the suggestion,

Jeff

15 Mar 2015, 5:52 PM
#23
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Hi Ajeh,

Thank you for your help....it worked! I now have all of the proper structure and data in my new v.1.5.4 database.

Thanks again,

Jeff

15 Mar 2015, 6:05 PM
#24
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Trouble updating database

Thanks for the update that you were able to copy your LIVE database to your NEW test database via phpMyAdmin and the OPERATIONS tab ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

15 Mar 2015, 6:18 PM
#25
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Yes, thank you Ajeh....this was the prefect solution and it worked quickly and easily.

So, yes before making database changes, a trusted backup should be made...

Next,if you have duplicates of table names with the difference only being the prefix (and of course content) then I would suggest deleting the duplicates. Of course need to know which table prefix is your live table prefix.. (DB_PREFIX in includes/configure.php)

So if the DB_PREFIX is zen_ for your active store, then configuration, zc_configuration, longlist_configuration could all be removed and not affect your current store. Would also suggest looking at the structure of the table(s), to ensure that even though there is a "different" prefix that the table doesn't represent something else that is instead important.

It's no wonder that the database size is so large, there are something like 4 different stores in it.

Generally speaking though, shouldn't have to place the store in maintenance mode...if doing things right, then the rest of the world wouldn't even know that there was anything going on in the background.

Also, before copying my old database into my new I did delete all duplicate tables (only kept the tables with the correct prefix) and it worked perfectly as well and certainly cleaned things up.

Thanks again to everyone for your help.

Best regards,
Jeff

25 Mar 2015, 3:41 AM
#26
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Trouble updating database

NWCE:

Do you know how to import the database into the new db using the Zen Cart Backup MySQL tool
Yes: just restore the database as you would after having made a backup:
NOTE: The following assumes you're using DIFFERENT DB_DATABASE SETTINGS for each site, else you'll be wiping out the other tables in your database, replacing them with out-of-date info, and thus losing data.

The Database Backup MySQL plugin puts its backups in the /admin/backups folder. So, copy (ie: using FTP) the file from that folder on the old site, to that same folder on your new temporary testing site. Then go into the Admin in your new temporary testing site and open the Database Backup MySQL plugin screen, and click on the backup file, and click Restore. REMEMBER doing the restore will DELETE AND REPLACE the data in the database you're using as specified in your configure.php file. So, be sure you're NOT using the same DB_DATABASE as your live site.

.
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.

25 Mar 2015, 2:45 PM
#27
nwce avatar

nwce

Zen Follower

Join Date:
Oct 2009
Posts:
444
Plugin Contributions:
0

Re: Trouble updating database

Thanks for your reply Dr.Byte.

I appreciate your instructions. I was wondering if you knew what to change on the "old" database before restoring into the new to keep it from downgrading the version of the database. When I install my v.1.5.4 into my temporary site and then place the v.1.5.3 backup into the admin/backups folder and run the Restore function all works perfectly except that now Zen Cart says my "database needs patching to a higher level". I then need to rerun the database upgrade.

Is there something to change in the database before restoring it to keep this from happening, or is this just part of the process. It's really not a big deal, but always looking for better ways if I am missing something.

Thanks again,

Jeff