WordPress and the ever unfortunate “Error Establishing a Connection to the Database”
Posted by Mike in TechnologySo I got a wild hair, and decided to actually post something on my blog today, but was surprised to find my site was completely down!

IT: Its a head banging good time
For some reason WordPress was having problems accessing the database. I did a quick check of my Webhost’s cPanel, and the database itself using MySQL and everything checked out. I confirmed other databases I had hosted still worked fine, which put the problem back on the WordPress installation and Database. The wp_config.php file was exactly the same as it was when I last touched it a few short months ago.
Exhausting all of my stellar trouble shooting skills, I turned to the Google Machine. After 10 minutes of trying various search terms, I came across another WordPress user who had this problem a few days ago. It seems WordPress randomly gets tired of using the same database login and decides to just stop working until you give it a new friend to play with. Five minutes later I have a shiny new database user created and a updated wp_config.php file uploaded.
…I bet you can guess where that got me since you are reading this post. So now I have two perfectly good database user IDs, only one works for every database other than WordPress. I’m reminded how much I hate technology and full of self-loathing that I have made it my career. I encounter way too many issues that are resolved without determining a root-cause.
Entries (RSS)
Glad to have been of assistance. It’s still a weird little hiccough, but it hasn’t recurred, so I’m willing (as another IT professional) to consider it solved. For now.