Error Establishing a Database Connection

Visiting a WordPress website I was momentarily disturbed to see a database connection error warning

Error establishing a database connection

This either means that the username and password information in your wp-config.php file is incorrect or we can't contact the database server at localhost. This could mean your host's database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

The error showed a failure to connect to the supporting database:

Here’s a screenshot of the error too.

Error establishing a Database Connection

Not the message you wish to see when you visit one of your websites.

Knowing that the website had previously been working I was sure that the configured connection strings were correct.

Was this a temporary glitch or did I need to enable logging of the website to understand the underlying cause?

Perhaps the error was caused by the server being to busy – an infrastructure issue.

Don’t Panic! Well not for a little while.

I waited a couple of minutes and tried again.

All was well – it was a temporary glitch.