Forums / Upgrading from 1.3.x to 1.3.9 / Import Database error

Import Database error

Locked

Started by paulclane on 20 Jul 2011, 10:18 AM · Views: 1,661

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
20 Jul 2011, 10:18 AM
#1
paulclane avatar

paulclane

New Zenner

Join Date:
Feb 2009
Posts:
23
Plugin Contributions:
0

Import Database error

Oh clever Zenners, please Help!
I have created a new test site for my online shop with a different hosting company. My old hosting was on an old legacy server and this company wanted me to move my Zencart shop to a new server, but they used a ZEUS web server, which didn't work very well.
So my test site installed beautifully with the new host. I am now in the process of uploading images, categories, etc, and I have totally renamed the admin folder to a Looooooooooong secret name. I never really got the hang of using custom file over rides, although I did try many times, but it never worked properly for me, so I will have to spend AGES comparing old an new php pages. I don't mind, but would have much preferred if the overrides worked for me. I wish a Zen Master would write a complete, idiot-proof, guide to overrides. I know there are a few guides out there, but they aren't as clear as I would have liked. And yes, I bought the book too!
Anyway, sorry for the blathering on, here is my problem: I tried to import the database from my old shop, (1.3.7), to my new shop, (1.3.9h), it fails at the first hurdle. It says: SQL query:Table structure for table zen_address_book. DROPTABLEIFEXISTSzen_address_book. (MyPHPAdmin 2.11.9.5. MySQL Client 5.0.83).
Well, the old database and the new database have different names and I presume this is the problem. My host won't let me create a DB name thet matches the old one. So, what do I do?:cry: any help please would be greatly appreciated!!!

20 Jul 2011, 12:04 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Import Database error

paulclane:

I tried to import the database from my old shop, (1.3.7), to my new shop, (1.3.9h), it fails at the first hurdle.First, you should ALWAYS go from same-version-to-same-version, never try to upgrade when changing servers.

If you're moving servers, use the SAME version on the new one as you had on the old one.
Then, once you've got it working on the new one, upgrade the site to the latest version.

OR upgrade on the old server BEFORE moving to the new server. Test that your upgrade works fine on the old server, and THEN move to the new server.

Never try to do both steps at the same time. They're completely different activities.

paulclane:

It says: SQL query:Table structure for table zen_address_book. DROPTABLEIFEXISTSzen_address_book. (MyPHPAdmin 2.11.9.5. MySQL Client 5.0.83).Apart from the fact that there should be spaces between DROP TABLE IF EXISTS, there's nothing wrong with what you've quoted there.
paulclane:

Well, the old database and the new database have different names and I presume this is the problem.Zen Cart doesn't care about database names being different, because you simply tell it the database name to use.
You're probably confusing the "zen_" DB_PREFIX with the database name.
Just use the same prefix on the destination server as you had on the old server. (ie: step 2a of the tutorial)
https://www.zen-cart.com/tutorials/index.php?article=100

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

20 Jul 2011, 9:01 PM
#3
paulclane avatar

paulclane

New Zenner

Join Date:
Feb 2009
Posts:
23
Plugin Contributions:
0

Re: Import Database error

Thanks for taking the time to reply!

Should I delete the new 1.3.9h and put 1.3.7 on the new server?

The datebase import stops dead at:
DROPTABLEIFEXISTS`zen_address_book
after about 20 seconds.

This point is moot, if I'm deleting 1.3.9h.

The prefix is zen on both DBs

20 Jul 2011, 9:10 PM
#4
drbyte avatar

drbyte

Sensei

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

Re: Import Database error

paulclane:

Should I delete the new 1.3.9h and put 1.3.7 on the new server?As I said before, it's best to have matching versions when switching servers.
Do keep in mind that v1.3.7 is not compatible with PHP 5.3 or newer.
paulclane:

The datebase import stops dead at:
DROPTABLEIFEXISTS`zen_address_book
after about 20 seconds.
I'm not surprised since DROPTABLEIFEXISTS is invalid syntax. If that's what's in your SQL backup file, you're in trouble.

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

20 Jul 2011, 10:05 PM
#5
paulclane avatar

paulclane

New Zenner

Join Date:
Feb 2009
Posts:
23
Plugin Contributions:
0

Re: Import Database error

I have taken weekly DB backups. My old site is still live and I can take a backup anytime. Why would I have the zen_address_book. DROPTABLEIFEXISTS error? and how do I resolve it?

20 Jul 2011, 10:11 PM
#6
drbyte avatar

drbyte

Sensei

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

Re: Import Database error

I've never seen it written like that before.
How exactly are you doing your DB backups?

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

20 Jul 2011, 10:14 PM
#7
paulclane avatar

paulclane

New Zenner

Join Date:
Feb 2009
Posts:
23
Plugin Contributions:
0

Re: Import Database error

I do my backups using MyPHP Admin, with all the specified boxes ticked, as recommended in the Zen support tutorials.

Can't I get anything right when it comes to Zencart?

20 Jul 2011, 10:17 PM
#8
drbyte avatar

drbyte

Sensei

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

Re: Import Database error

paulclane:

(MyPHPAdmin 2.11.9.5. MySQL Client 5.0.83).
That's a pretty old version of phpMyAdmin. Perhaps an update would be appropriate, given that v2.11 is end-of-life.
http://www.phpmyadmin.net/home_page/news.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.

20 Jul 2011, 10:23 PM
#9
paulclane avatar

paulclane

New Zenner

Join Date:
Feb 2009
Posts:
23
Plugin Contributions:
0

Re: Import Database error

I read the EOL yesterday and I wasn't very happy. I am moving from one hosting company to another because of the problems I am having with Zencart and Moodle sites, and now I find that the new host has old PHP! :censored:

20 Jul 2011, 10:37 PM
#10
drbyte avatar

drbyte

Sensei

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

Re: Import Database error

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

21 Jul 2011, 8:03 AM
#11
paulclane avatar

paulclane

New Zenner

Join Date:
Feb 2009
Posts:
23
Plugin Contributions:
0

Re: Import Database error

Thanks Doctor!

However, hosting an Irish website with a non-Irish host is pure SEO-suicide!

I'm going to keep working on the MyPHP Admin database side, as there must be a way to import the DB

But, believe me, I really, really, appreciate your very knowlegeable input!!

It has given me a lot to think about