How hard would it be and what are the steps to change the existing database to another one within the same webhost?
Thanks so much,
Ashley
How hard would it be and what are the steps to change the existing database to another one within the same webhost?
Thanks so much,
Ashley
You should be able to backup the database ... make your new database and load the database into that ...
Depending on the size, phpMyAdmin can generally handle this ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
In what way do you want to "change" the database?
Do you want your zenshop to "read" data off another database?
Do you want to change the database from MySQL to PgSQL (not possible, I don't think).
If you want your zenshop to read off another MySQL database, then you need to make sure that the database is "compatible" with the version of zen cart you are using. So, if the database you wish to use is configured for an earlier version of zencart than the one you intend to apply to that database, you will need to "patch the database to a higher level".
If you have installed 3rd party modules in your zenshop, and these modules have required alterations/additions to the original database, you will need to ensure that the alterations/additions are ALSO configured in the new database.
When you have made sure that the database is configured and structured to be compatible with the zencart version you intend to use, you simply point your zenshop to the new database by editing the two CONFIGURE.PHP files .
20 years a Zencart User
Do you want your zenshop to "read" data off another database? Yes; Basically, I want to copy my existing database into a new one and then, read/write to the new one.
When you have made sure that the database is configured and structured to be compatible with the zencart version you intend to use, you simply point your zenshop to the new database by editing the two CONFIGURE.PHP files . Where are these files located?
CATALOGUE/INCLUDES/CONFIGURE.PHP
CATALOGUE/ADMIN/INCLUDES/CONFIGURE.PHP
LOOK FOR THIS PART. The changes you make are in RED
// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', 'YOUR-SERVER_YOUR-USERNAME');
define('DB_SERVER_PASSWORD', 'YOUR-PASSWORD');
define('DB_DATABASE', 'YOUR-SERVER_YOUR-DATABASE');
define('USE_PCONNECT', 'false'); // use persistent connections?
define('STORE_SESSIONS', ''); // use 'db' for best support, or '' for file-based storage
Bear in mind the significance of the other DEFINES (above) - particularly the username and password. If your NEW database has different users and passwords, then you will need to express these too, in the respective defines.
Before you can edit these CONFIGURE.PHP files, you will need to change the permissions to allow you to WRITE to them. When you have edited them, you must change the permissions BACK to 644 or 444 to make them UN-WRITEABLE.
20 years a Zencart User