Error establishing a database connection on WordPress

Are you encountering database connection errors on your WordPress site?
Your database status could be on “stop/waiting”

Solution (using putty):

First we’ll check the status of mysql

sudo su -
service mysql status

If it shows the mysql status is “stop/waiting” we can proceed to restart it.

service mysql restart

Once it’s restarted, it should be up and running.