Site maintenance: Sun 15 Nov, from 12:00 UTC, about 4–6 hours. Details

This cutover relies on some testing that is still incomplete so may be cancelled at short notice

Forums / Installing on a Linux/Unix Server / Moving Site - Cannot Use Same Database Prefix

Moving Site - Cannot Use Same Database Prefix

Locked

Started by creative on 23 Nov 2009, 11:35 PM · Views: 2,998

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
23 Nov 2009, 11:35 PM
#1
creative avatar

creative

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Moving Site - Cannot Use Same Database Prefix

Zen Cart 1.3.8a

I am in the process of moving a site from one host to another. I've been following these directions: https://www.zen-cart.com/tutorials/index.php?article=100 along with these: https://www.zen-cart.com/tutorials/index.php?article=107 to accomplish the task. In the "moving instructions," step 2a asks for the new database on the new hosting space to have the same prefix as the established database on the old space. However, the new hosting service automatically assigns the database prefix. I've called to ask if I can somehow override this and they've told me "no."

As an alternative, could a script be run to rename the tables in the existing database so they will match the preassigned prefix of the new database? Thanks in advance for your time.

23 Nov 2009, 11:37 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Moving Site - Cannot Use Same Database Prefix

You're confusing the word "prefix" with "username".

The DB_PREFIX setting in Zen Cart is something you decide, and is used as a tablename prefix, not a databasename prefix.

Zen Cart doesn't care how you name your database: use whatever your hosting company provides, and simply tell Zen Cart the correct database name in the configure.php file.

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

23 Nov 2009, 11:37 PM
#3
kobra avatar

kobra

Black Belt

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

Re: Moving Site - Cannot Use Same Database Prefix

Do they provide you with the phpmyadmin tool?

Zen-Venom Get Bitten

23 Nov 2009, 11:45 PM
#4
creative avatar

creative

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: Moving Site - Cannot Use Same Database Prefix

I don't believe I am confusing the two. When I access CPanel to create a new database with MySQL, it gives me a field for "create database." I type the name of my database into the field and click "create database." The database then appears listed as current database.

For example, I type in "store" and click the create database button. retail_store then appears under current databases. I in no way was given an option to set the prefix ("retail" being preassigned through my account).

Kobra, I have access to a phpMyAdmin tool.

23 Nov 2009, 11:46 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Moving Site - Cannot Use Same Database Prefix

creative:

I don't believe I am confusing the two. When I access CPanel to create a new database with MySQL, it gives me a field for "create database." I type the name of my database into the field and click "create database." The database then appears listed as current database.

For example, I type in "store" and click the create database button. retail_store then appears under current databases. I in no way was given an option to set the prefix ("retail" being preassigned through my account).
And ... that's all dealing with the database name, and has no relationship to the DB_PREFIX in Zen Cart.

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

23 Nov 2009, 11:49 PM
#6
creative avatar

creative

New Zenner

Join Date:
Jul 2005
Posts:
85
Plugin Contributions:
0

Re: Moving Site - Cannot Use Same Database Prefix

And the instructions (https://www.zen-cart.com/tutorials/index.php?article=100) are referring to the TABLE prefix during setup. Ack, avert your eyes as the proverbial lightbulb turns on! Wouldn't want anyone blinded. Thank you as always for the prompt responses.