Chaosxmk
Chaosxmk

Reputation: 745

Need to change DB password in Joomla

The DB password was recently change for a website I'm working on (for reasons I won't get into). As such, Joomla is no longer able to connect to the DB, prompting the error message: Database connection error (2): Could not connect to MySQL.

Fortunately, I do know that I need to simply update the password in the configuration.php file to use the new password, but all of my attempts at making the change have failed. For security reasons I'm sure, I am completely unable to upload my modified configuration.php file. Normally I'd be happy to hear that the configuration file can't be modified, but in this one instance I need to modify it.

How would I go about modifying the file?

Upvotes: 0

Views: 347

Answers (2)

Sbpro
Sbpro

Reputation: 988

Being unable to upload / modify the configuration file, smells like a permissions issue. Maybe the file has permissions set to 444. Many FTP clients allow manipulation of the file permissions. You can set them to 644 for the config. file and then save it. If you can't do this through the FTP client, then try it within the cPanel.

Upvotes: 0

Lodder
Lodder

Reputation: 19733

You options would be:

  1. Upload new configuration.php via FTP file with new DB password value, however as you mentioned, you're unable to upload it.
  2. Login to your hosting control panel and upload the configuration.php file via the built-in File Manager
  3. Login to and change the password back to it's original value
  4. Get in contact with your hosting provider and find out as to why you're unable to upload the config file.

One of the above options should work, however if all else fails, your last resort will be to contact the person who changed the DB password and ask them to change it back.

Upvotes: 1

Related Questions