Forums / Installing on a Linux/Unix Server / SQL - import when upgrading - HELP!

SQL - import when upgrading - HELP!

Locked

Started by cotswold on 12 Sep 2007, 7:42 PM · Views: 2,591

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
12 Sep 2007, 7:42 PM
#1
cotswold avatar

cotswold

New Zenner

Join Date:
Dec 2006
Posts:
27
Plugin Contributions:
0

SQL - import when upgrading - HELP!

Ok so we have swapped servers

Our new one is php 5.2.0, so have no option but to install v1.3.7, otherwise a fatal error on admin logon develops.

So installed v1.3.7 - working fine with a brand new database.
However when I try to drop the old SQL tables into the new database I get the following error:

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

This is a reference to the old database, not the new one

Can anyone help out a confused person with little knowledge (enough to be dangerous though!!!:frusty:)

12 Sep 2007, 10:56 PM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,897
Plugin Contributions:
21

Re: SQL - import when upgrading - HELP!

It appears that your prefixes for the two databases do not match. If the old was zencart_configuration and was trying to load into zen_configuration, you'd get this kind of problem. Try using a text editor to change a SAVED version of the sql file to change the prefixes.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

13 Sep 2007, 12:50 AM
#3
drbyte avatar

drbyte

Sensei

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

Re: SQL - import when upgrading - HELP!

... or just be sure to use the same DB_PREFIX setting in your new configure.php files as you were using in the old configure.php files prior to the move.

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

13 Sep 2007, 2:40 AM
#4
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,897
Plugin Contributions:
21

Re: SQL - import when upgrading - HELP!

yep, tried that on one occasion but the host set their own prefix.:no:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

13 Sep 2007, 3:05 AM
#5
drbyte avatar

drbyte

Sensei

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

Re: SQL - import when upgrading - HELP!

Fair enough.

I'm just hesitant to tell anyone to do a global search/replace because unless they manually check EACH instance before replacing, they "might" be editing wrong stuff.
Some folks assume that they can fix their SQL content by renaming "zen_" is safe ... when it's actually very dangerous.
Just something that needs to be kept in mind when doing search/replaces.

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

13 Sep 2007, 3:23 AM
#6
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,897
Plugin Contributions:
21

Re: SQL - import when upgrading - HELP!

ABSOLUTELY, should have mentioned that. At least I said use a copy.:yes:

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

13 Sep 2007, 11:34 PM
#7
cotswold avatar

cotswold

New Zenner

Join Date:
Dec 2006
Posts:
27
Plugin Contributions:
0

Re: SQL - import when upgrading - HELP!

Thanks all, now have zencart up and running having manually renamed the files. I now have a Your database appears to need patching to a higher level. See Tools->Server Information to review patch levels. Here it shows Zen Cart 1.3.7.1 Database Patch level: 1.3.6

** PHP Version: ** 5.2.0 (Zend: 2.2.0)
** Database Host: ** localhost (127.0.0.1)
** Database: ** MySQL 5.0.27-standard

What is the best way to fix this?

13 Sep 2007, 11:37 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: SQL - import when upgrading - HELP!

cotswold:

Your database appears to need patching to a higher level. See Tools->Server Information to review patch levels. Here it shows Zen Cart 1.3.7.1 Database Patch level: 1.3.6You need to run zc_install/index.php, choose Database Setup on the inspection screen, and complete the upgrade steps checked.

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

14 Sep 2007, 7:54 AM
#9
cotswold avatar

cotswold

New Zenner

Join Date:
Dec 2006
Posts:
27
Plugin Contributions:
0

Re: SQL - import when upgrading - HELP!

Great that fixed the problem, thanks for your help.

9 Oct 2007, 5:11 PM
#10
currentwave avatar

currentwave

New Zenner

Join Date:
Feb 2006
Location:
From my home
Posts:
37
Plugin Contributions:
0

Re: SQL - import when upgrading - HELP!

Dear Dr. Byte, I followed your instructions to Cotswold, but after running for several minutes the window just went blank, white to be specific.

So I went back to the beginning of the install and went through clicking Continue and then agreeing to the terms and at the update page typing in my username and password and then clicking Update Database, but the screen went blank right away.

So I cleared my cache files and did it all again, this time it went the same as the first time, blank after a very long time of what appeared to be working. About 1:00am I went to bed. When I tried it this morning it's still the same.

So what do I do now? I'm stuck.... please help me Dr.

Thank you

10 Oct 2007, 12:50 AM
#11
currentwave avatar

currentwave

New Zenner

Join Date:
Feb 2006
Location:
From my home
Posts:
37
Plugin Contributions:
0

Re: SQL - import when upgrading - HELP!

Okay, for those searching for help later on I fixed this problem by using phpadmin on mySQL data base and optmizing it and repairing problems.

Now on to the next issue -

I now get this error message when I click update database
1062 Duplicate entry '1-1' for key 1
in:
[INSERT INTO zen_paypal_ipn_address_status VALUES (1, 1, 'confirmed');]

I had version 1.2.6 on mySQL 4.? and
I'm updating to Zen 1.3.7 on mySQL 5.

I also see this:
Upgrade Sniffer predicts: upgrade v1.1.4 to v1.1.4_patch1 and these are checked as well
Upgrade DB from 1.1.4-x to 1.2.0
Upgrade DB from 1.2.1 to 1.2.2 I don't understand why all these are selected when they are below 1.2.6, but I guess I need them too.....

Please help,

Thank you

10 Oct 2007, 3:35 AM
#12
drbyte avatar

drbyte

Sensei

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

Re: SQL - import when upgrading - HELP!

Your issues are being discussed in the other thread you've started related to upgrading. Please continue the discussion there.

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