How to change the database address?

Marcus Ramos

Joined: 2006-09-15
Posts: 41
Posted: Mon, 2010-12-06 20:24

Hi,

My service provider has changed the address of my database, and now my Gallery 2 site does not work anymore. I was instructed by them to change my application to use the new db address, but I have no idea how to do it. I appreciate if someone can tell how to accomplish this.

Regards,
Marcus.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-12-06 20:25

edit gallery2/config.php about half way down

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
Marcus Ramos

Joined: 2006-09-15
Posts: 41
Posted: Mon, 2010-12-06 20:38

Thanks for the reply. Please tell me if this is all:

$storeConfig['type'] = 'mysqlt';
$storeConfig['hostname'] = 'REMOVED';
$storeConfig['database'] = 'REMOVED';
$storeConfig['username'] = 'REMOVED';
$storeConfig['password'] = 'REMOVED';
$storeConfig['tablePrefix'] = 'g2_';
$storeConfig['columnPrefix'] = 'g_';
$storeConfig['usePersistentConnections'] = false;
$gallery->setConfig('storage.config', $storeConfig);

Because these information are updated and the application is still not running. Is there some other place where I should change things as well?

Regards,
Marcus.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2010-12-06 20:52

glad you removed those values I saw in my email notification, that's the kind of info you keep private.
But the hostname you listed was not the full address.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-12-06 20:54

To answer your question, change the hostname setting.

NEVER post sensitive information like that. Best to change as much of that information as possible, and try not to use such weak passwords either :)

Ask your host to make sure all the other information is correct. And since you'll be resetting your password soon, you should know exactly what that is :)
____________________________________________
Like Gallery? Like the support? Donate now!

 
Marcus Ramos

Joined: 2006-09-15
Posts: 41
Posted: Mon, 2010-12-06 21:00

Sorry for that and thanks for preserving it and also for the observation.
Regards,
Marcus.

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-12-06 21:05

For something like DB passwords since they are typically written in some file and you typically don't need to type them to log into something, I make mine very complex. It's saved in the db connection file (config.php in G2's case) and I also save my passwords in a program like Password Safe that can keep all that stuff encrypted:
http://passwordsafe.sourceforge.net/

I bet I know what year you were born :)
____________________________________________
Like Gallery? Like the support? Donate now!

 
Marcus Ramos

Joined: 2006-09-15
Posts: 41
Posted: Mon, 2010-12-06 21:40

Dear Nivekiam,

Thanks a lot for the hints. I have already changed the password.

Regards,
Marcus.