Forums / Setting Up Categories, Products, Attributes / Need help transferring database --> Database needs to be loaded onto 2 other sites.

Need help transferring database --> Database needs to be loaded onto 2 other sites.

Locked

Views: 1,677

Results 1 to 14 of 14
This thread is locked. New replies are disabled.
22 Sep 2009, 9:31 PM
#1
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Need help transferring database --> Database needs to be loaded onto 2 other sites.

Hey guys,

I've been able to export the database to excel, however I'm not sure how to export and upload that information to two of my other sites.

As opposed to setting up each individual category and product listing I was hoping to just dump everything onto each of the other servers..

Is this possible? Would I need to re-upload all of the photos and product details?

Thanks!

Ryan

22 Sep 2009, 9:35 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

You would follow this approach if you wanted to move to another server, or install a copy of the site on another server: https://www.zen-cart.com/tutorials/index.php?article=100

And, yes, you'll need to copy all your images along with all the other files as mentioned in the article.

.
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 Sep 2009, 4:48 PM
#3
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

Okay I've followed those instructions, I've exported my database from my old server and uploaded all of my files from the old site to the new one. Once I've finished that step I've removed all the tables from the new (clean) database, and imported all of the tables from the old SQL database.

Unfortunately I keep getting this message.

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

I made sure that before I exported anything from my old site that I updated my old version of ZenCart. I'm wondering if there is a slight problem because my old site used a slightly older version of mySQL.

25 Sep 2009, 4:55 PM
#4
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

As opposed to loading the tables manually using PHPMyAdmin I've created a database back up which I've uploaded to my new server.

Unfortunately, the name is different and I can't just substitute it in for the new database. Without access to the Admin, how do I point ZenCart to look at a new database?

25 Sep 2009, 5:04 PM
#5
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

DrByte:

You would follow this approach if you wanted to move to another server, or install a copy of the site on another server: https://www.zen-cart.com/tutorials/index.php?article=100

And, yes, you'll need to copy all your images along with all the other files as mentioned in the article.

So to try and set the database to my old database I reran the ZC_Install folder.

When I pointed it towards my old database it spewed out this message..

1146 Table 'locker_zc1.configuration' doesn't exist
in:
[update configuration set configuration_value='/home/locker/public_html/catalog/cache' where configuration_key = 'SESSION_WRITE_DIRECTORY']

I think I might be running into a 1.3.8 vs 1.3.8a issue here or an old ver. mySQL database won't work with this one.

I'm puzzled and don't really know what to do.

25 Sep 2009, 5:39 PM
#6
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

Figured it out.

The database name for the old server was iterotics_zc1 and on the new server its locker_zencart.

Unfortunately with my host all SQL databases must start with the site username_(databasename) so I don't see a way around this.

Help?

25 Sep 2009, 6:37 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

The DB_xxxxxxx settings in your configure.php file control the database access details.

.
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 Sep 2009, 6:48 PM
#8
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

DrByte:

The DB_xxxxxxx settings in your configure.php file control the database access details.

Okay well what I'm trying to figure out is that if my database on my old server is..

it_zc1

and the db name on my new server is

locker_zc1

Will this inhibit me from transferring everything over?

I've found the FAQ about this exact problem, however the only way I can create a database on my new server with the exact name as the old database is by going into phpMyAdmin in the WHM right on my server.

Unfortunately, what that means is when I log into the website, I can't see that database through the sql database management system in the cpanel.

25 Sep 2009, 6:52 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

No, the 2 databases don't have to have the same "name". Just set the new server's name in the configure.php file. That would have already been done for you when you ran zc_install by following the FAQ I pointed you to earlier.

You're probably using different DB_PREFIX values on the different servers, thus causing the tables to not be found. The FAQ article also mentions this point as something to address during the move process. Maybe you missed that?

.
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 Sep 2009, 6:55 PM
#10
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

DrByte:

No, the 2 databases don't have to have the same "name". Just set the new server's name in the configure.php file. That would have already been done for you when you ran zc_install by following the FAQ I pointed you to earlier.

You're probably using different DB_PREFIX values on the different servers, thus causing the tables to not be found. The FAQ article also mentions this point as something to address during the move process. Maybe you missed that?

Yes I did miss that. You are referring to this part here?

Store Identifier (Table-Prefix)

What is the prefix you would like used for database tables? Example: zen_ Leave empty if no prefix is needed.
You can use prefixes to allow more than one store to share the same database. more info...

So as it stands right now...

In my cPanel I see my database it is called

locker_zc1

my database is locker and my prefix is zc1?

25 Sep 2009, 7:16 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

No, the "prefix" would be the letters added to the beginning of all the names of your tables inside your database. It has NOTHING to do with the name of the database itself.

It's simple. Table names might be like this:
"address_book"
"customers"
"orders"

and if you have a "prefix" added to the beginning of those names, they might look like:
"myprefix_address_book"
"myprefix_customers"
"myprefix_orders"
... in which case your prefix would be "myprefix_" ... as shown in the DB_PREFIX setting in that server's configure.php files.

.
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 Sep 2009, 7:21 PM
#12
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

DrByte:

No, the "prefix" would be the letters added to the beginning of all the names of your tables inside your database. It has NOTHING to do with the name of the database itself.

It's simple. Table names might be like this:
"address_book"
"customers"
"orders"

and if you have a "prefix" added to the beginning of those names, they might look like:
"myprefix_address_book"
"myprefix_customers"
"myprefix_orders"
... in which case your prefix would be "myprefix_" ... as shown in the DB_PREFIX setting in that server's configure.php files.

Awesome.

Okay now how do I go back and change the prefix after I've already installed Zen Cart.

I finally figured out what the problem is!

Thanks so much!

25 Sep 2009, 7:26 PM
#13
drbyte avatar

drbyte

Sensei

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

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

Is there a reason not to install clean, using the right prefix, now that the light has come on?

.
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 Sep 2009, 7:27 PM
#14
lockerroom avatar

lockerroom

New Zenner

Join Date:
Sep 2009
Posts:
35
Plugin Contributions:
0

Re: Need help transferring database --> Database needs to be loaded onto 2 other sites.

DrByte:

Is there a reason not to install clean, using the right prefix, now that the light has come on?

I already started a clean install.

Thanks.