Fixed “Error establishing a database connection” WordPress error

As the error is self-explanatory that the website could not connect to the site database. For those who don’t know WordPress uses the PHP MySQL extension to talk to the database. For the site to work, you should have PHP + Mysql installed on the server and properly configured with WordPress.