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/i...hp?article=100 along with these: https://www.zen-cart.com/tutorials/i...hp?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.
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.
Re: Moving Site - Cannot Use Same Database Prefix
Do they provide you with the phpmyadmin tool?
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.
Re: Moving Site - Cannot Use Same Database Prefix
Quote:
Originally Posted by
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.
Re: Moving Site - Cannot Use Same Database Prefix
And the instructions (https://www.zen-cart.com/tutorials/i...hp?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.