General Question

manuel_alarcon's avatar

About Joomla1.5 database change?

Asked by manuel_alarcon (299points) April 21st, 2010

Hi, Im managing this joomla site, and i want to change the database prefix; I know i should do it on install, but in the middle of the project the client put another person and after weeks they turned back to me. Now Im closing all the possible security threats and I have this doubt: I’ve exported the db, changed the prefix in the mysql script and populated a new database; but when I was going to import it in the original database, i thought I’d better change the config file to point to the new database, thus having a backup in case something went wrong, so i could quickly roll back… but changing the database and the prefix doesnt work. “Cant connect to db” and when i looked more into it, it seems the session gives trouble… where do i have to look to solve this and go on with the change? is that easy to swap databases? the DB user in the cpanel is the same in both DBs… i dont know what im missing here

Observing members: 0 Composing members: 0

4 Answers

martyjacobs's avatar

Sounds like you just need to change the reference to the DB in your config file (configuration.php in root of site). Open it with a text editor and looks for the following entry:

$mosConfig_db = ‘dbname’;

Make sure dbname is set to your new DB (with the new prefix).

manuel_alarcon's avatar

that’s what Im doing! but i’ve just realized the trouble: the user of the db and the db are named the same,... and Im changing it both! now i gave it a try but one step at a time and realized i was changing the user so, i was changng the db name and the user for one that didnt exist! so now, left the user untouched the site worked out right.
my bad.
thanks, but my question remains: Im sure there’s no exact way to manage it, i mean, you can follow the right steps but theres always one or two solutions for a specific problem; so, is my way a ‘recommended’ way? or i better stick to pro’s? maybe closing a door this way is opening another

martyjacobs's avatar

Yeah, I don’t think there is an ideal way to do this kind of thing (this is why it is almost impossible to diagnose these issues, unless you have access to the server). Just keep bashing until it is fixed, that’s my philosophy :D Glad you found the solution.

manuel_alarcon's avatar

thanks! yes, there’s no ideal way until you go “DO’H!” and realize what was wrong…

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther