Where does cs-cart store the database name

During install it created its own name but for reasons I won’t bore you with I need to change this name to something different.

Where does it store this info and is it in just one place or multiple places?

I am hoping I can just change the name but maybe there is more to it than that?

You are able to change the database name in this line of the code:

$config['db_name'] = 'XXXXXXX';

in the “config.local.php” file located in the root directory of your CS-Cart.

(I may be a bit out of date on changes that have happened around here but we didn’t used to really get official cs-cart folk on here - nice to see - and a good community with support helps sales - IMHO)

Anyway thanks for that.

So - you have got me thinking now - if I work on an offsite copy of the cart with all the setting etc - and I am not bothered about preserving the sales data etc - could I just upload the new database and the pictures to the file system and swap this one line of code and it is done.

OR am i just showing myself up to be very daft.

I tried renaming the database, by creating a new one, exporting tables and data from the current one and importing them to the new one. That step wasn’t a problem.

But when I changed the suggested line in config.local.php, it doesn’t work. Loading a page give me a ‘server error’.

Is there something else I need to do to rename the database in the newest cs-cart version?

What was the exact server error?

Just guessing here…

Did you assign a user to the new database and also ensure that info was correct in config.local.php?