Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

how to change MySQL database name from 'catalog' to 'xyz'?


pabloron

Recommended Posts

Hello - I am new to OSCOMMERCE, and in trying to get to know it better I have run into my first stumbling block - my host won't allow the name 'catalog' as the MySQL database name. Can someone tell me the easiest and most efficient method to edit the php code so that I can change the database name there? Is this a bad idea for some reason?

 

Many thanks - Paul

Link to comment
Share on other sites

Hi,

 

I don't know how far you have got, I assume not too far if you haven't uploaded the database. If the version you are using has the install script (e.g. 2.2MS1) then you can input your database name into the appropriate box and it will do the rest for you. You access this from your web browser "www.yourserver.com/catalog/install/"

 

 

If not, you will have to find the scripts (e.g. catalog/includes/configure.php & admin/includes/configure.php) with the database variable as 'osCommerce' and change it to your database name, as well as inputting your username and passsword as required.

 

// define our database connection

define('DB_SERVER', ''); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', 'mysql');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'your database name here'); :D

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

 

See http://guide.oscdox.com/ for more installation information that will help.

 

 

Good Luck

 

Baz

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...