If this is your first visit, check our documentation. To post, register or login.

DB Import

Started by gcopping on 3 Apr 2013, 9:03 AM · Views: 2,222

Results 1 to 13 of 13
3 Apr 2013, 9:03 AM
#1
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

Post #1 by gcopping

I am trying to upgrade from 1.3.9h to 1.5.1 and have transferred all code across and am now trying to transfer the db across. I have backed up the existing db using PHPMyAdmin Export function and then using the PHPMyAdmin Import function have tried to restore the backed up db to the new db. I get a message saying that the import was successful but when I check the content in PHPMyAdmin all tables are empty, and of course looking at the site it does not show any of the content.

Can anyone please point me in the right direction as I don't know what to try next?

3 Apr 2013, 3:18 PM
#3
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

Post #3 by gcopping

Thanks for your response.

Yes I did use this tutorial and have just run the backup and restore again to check I had all the correct settings but I am still getting the same result. The back up file is a good size but does get created very quickly, whereas the import takes a few minutes, but again all the tables are empty.

Any other ideas?

3 Apr 2013, 3:22 PM
#4
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

Post #4 by gcopping

Additionally I have just noticed that the DB table prefixes of the 2 databases are different - does this affect anything?

3 Apr 2013, 6:00 PM
#5
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #5 by kobra

DB table prefixes of the 2 databases are different
Yes - If following the tutorial importing should create a full set of additional tables with the other prefix

Zen-Venom Get Bitten

4 Apr 2013, 7:38 AM
#6
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

Post #6 by gcopping

Thanks again for the response.

I've checked the backup with Wordpad and it contains all the data so it is the import which is not working. The table prefix in the backup is 'zw4t' so are you saying that the import should also create tables with this prefix? The prefix showing in the restore is 'zc1' but of course there is no data in the restored file because it has not worked, and therefore I wouldn't expect to see the prefix 'zw4t' until the restore has worked.

I have checked again that I have followed the tutorial correctly so do you have any other ideas for me to try?

4 Apr 2013, 7:46 AM
#7
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Post #7 by schoolboy

gcopping:

I've checked the backup with Wordpad

NEVER USE WORDPAD... keep well away from any program with "Microsoft" in the title.

ALWAYS VIEW and EDIT files with a PLAIN TEXT EDITOR. I use CRIMSON EDITOR. There is also NOTEPAD++ (not the same as "notepad")

20 years a Zencart User

8 Apr 2013, 3:24 PM
#8
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

Post #8 by gcopping

Can anyone out there help me because I am completely at a loss at the moment and cannot upgrade my customers site until I resolve this problem?

My original db in 1.3.9h is called ioncom_zc1 and has a table prefix of 'zw4t'. I have backed up this db and the backup file appears to be OK. I am then trying to restore it into a new db created under 1.5.1 called ioncom_zc2 with table prefix of 'zc2'. I am using PHPMyAdmin for both the export (for the backup) and import (for the restore). The import appears to run but then when I check the tables using PHPMyAdmin they are empty.

I have followed the Zencart tutorial to do this and checked it a number of times to make sure I havn't missed anything. I also have my hosting company checking this but they have not come up with anything yet.

8 Apr 2013, 5:42 PM
#9
dbltoe avatar

dbltoe

Totally Zenned

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

Post #9 by dbltoe

Until you tell the new cart to use the same database prefix as the one you are upgrading, it will not work.

You missed step 5 of item B at http://www.zen-cart.com/content.php?140

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

8 Apr 2013, 6:00 PM
#10
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

Post #10 by gcopping

Thanks for your reply.

Yes I understand that I need to change the configure.php files, but I am firstly checking that I have my data in the db before I do this. I am doing this by looking at it with PHPMyAdmin, and it is not showing any data in the db, so even when the configure.php files are changed it can't show any data as it doesn't exist.

8 Apr 2013, 7:34 PM
#11
lhungil avatar

lhungil

Totally Zenned

Join Date:
Feb 2012
Location:
mostly harmless
Posts:
1,816
Plugin Contributions:
4

Post #11 by lhungil

gcopping:

... I am firstly checking that I have my data in the db before I do this. I am doing this by looking at it with PHPMyAdmin, and it is not showing any data in the db ...
Then your database import failed for whatever reason. Some potential reasons:

  • MySQL Version differs from the "exported" database server and the server where the data is being "imported".
  • The backup file is too large to be uploaded (PHP max upload size).
  • The backup file is taking too long to run (PHP max runtime).
  • You forgot to uncheck "Allow Partial Import" in the Partial Import section.
  • Your original backup is corrupt (rare).
  • You backed up the entire database... As opposed to the individual tables in the database. (backup sql file will start with something like "CREATE DATABASE ioncom_zc1 ... USE ioncom_zc1;") WARNING: In this case you may be overwriting the 1.3.9h DB with your backup!

The glass is not half full. The glass is not half empty. The glass is simply too big!
Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

9 Apr 2013, 3:56 PM
#12
gcopping avatar

gcopping

New Zenner

Join Date:
Jan 2010
Posts:
80
Plugin Contributions:
0

Post #12 by gcopping

Thanks for help with this - finally resolved by my server hosting company. Apparently it was to do with PHPMyAdmin restrictions on my server. I need to backup and restore at command line level with mysql commands.

9 Apr 2013, 9:46 PM
#13
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #13 by kobra

Thank you for posting the resolution

Zen-Venom Get Bitten