Unable to load page - database problem?

Permalink 1 user found helpful
I'm receiving the following error message when I enter the URL for my website (created with Concrete5, hosted by Dreamhost):

---
Unable to connect to database.
A database error occurred while processing this request.
---

I suspect the problem came about because I forgot to log out of my Concrete5 dashboard before attempting to export my sql database using phpMyAdmin - I'm pretty sure the error message appeared after exporting the database.

Any suggestions on how to get things up and running again? Thanks for any help you can provide.

 
mnakalay replied on at Permalink Best Answer Reply
mnakalay
If all you did was export the database using phpmyadmin, login out or C5 wouldn't make any difference.

Are you sure you didn't delete the database or rename it or something like that, by accident?

If you did but still managed to get a proper backup (succesful export), I suggest you import back again. It might help.

Good luck
DannyScL replied on at Permalink Reply
Thanks for your quick reply. I successfully restored my database from a backup from a few days ago, but the error message is still appearing.

It's possible that the name given to the restored database doesn't match what C5 is looking for when it tries to load the page. Is there a way to figure out the name that C5 looks for when it tries to load a page so I can check to see if that name matches the restored database?
mhawke replied on at Permalink Reply
mhawke
Have a look in "root/config/site.php"

That lists the following:

define('DB_SERVER', 'xxxxxxxxx');
define('DB_USERNAME', 'xxxxxxxxxx');
define('DB_PASSWORD', 'xxxxxxxxxx');
define('DB_DATABASE', 'xxxxxxxxxx');

Of course the xxx's will be the values C5 is trying to use to connect to your database.
DannyScL replied on at Permalink Reply
That did the trick. Something got screw-y in my database settings, but it's all working now. Thanks for your help.