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

Permalink
Website just died. Not sure why. Perhaps because 2 people were logged in on different computers using the same username?

So... website is destroyed now, right? I have to somehow upload a backed-up database in order to fix this?

 
ryan replied on at Permalink Best Answer Reply
ryan
Basically your website can't connect to it's mysql database, here are things that I suggest checking:

- Check your server to make sure the database server is actually running - you may have to contact your hosting company. If you have phpmyadmin use that to try to connect to the database

- somehow your database access info has changed or maybe you changed your database user and pass in your config/site.php
zoinks replied on at Permalink Reply
Thanks, I marked yours as best answer because it probably is the answer I need... but, I actually went through my browser history out of desperation to see if I could load one of the pages I edited or get into the control panel somehow.

I was able to reload the page I edited from the browser history, click Edit and Exit and Publish again. That solved everything.

Big quirk whatever it was. I really think it was some problem with 2 people signed in at once with the same user name. It was very scary.
APBCadmin replied on at Permalink Reply
APBCadmin
I just had this same error occur.

I tried to connect to my database via MySQL, and the connection failed. I run a dedicated server, and MySQL showed as running in DirectAdmin, but was not responding.

I also noticed that my server memory was being used at about 96%, which is very abnormal.

A server reboot was able to restore the MySQL connecion, and thus the web site is back up.

Glad it was an easy fix!