Undoubtedly, wordpress being a number one CMS has the most number of websites on the internet. Its popularity is high, as it renders the simplest way to create high websites with high functionality. Any of the inaccurate database information WordPress settings can create the issue that gives you the message, Error Establishing a database connection. Along with the misinformation of database information, the unavailability of response from the server and corrupted database is also the possible reason behind the error.
Overcoming the issue, look ahead a few steps:
Step 1: Connect with your hosting service provider
Step 2: Check for corrupted plugins or theme files