For some reason or another WordPress may show an error connecting to the database. The fastest way fix the problem is to simply delete the wp-config.php.

Then load the site and it will first ask for your language like a fresh install, select your language.

Now with the database credentials fill in the required values and WP should be able to once again connect to the database. It may prompt to update the database, do that.

WordPress will notice your database is present and it will then ask if you want to log in. You can then logon and carry on with your work.

If WordPress prompts to update, run it and make sure that all the plug-ins are updated as well.

We use WordPress so we can share solutions for users easily with easy to the point articles.