There are many reasons due to which you are unable to fetch the data from your MySQL database. Following are some common causes for this to happen:
Incorrect database login credentials. It is possible that database login credentials are changed but not updated in the connection string of the config file.
You can open your config file, collect the password and reset it for your database user.
MySQL service is down/unresponsive. When the website is having too many concurrent connections or bumped with lots of traffic.
Please restart the MySQL service to fix it.
Database table corruption. Sometimes table corruption can result into a database connection error.
You can repair the corrupted table from cPanel/phpMyAdmin.
Above mentioned are the common causes. However, if you face any error other than these, you can contact us to diagnose it further. Please raise a support ticket.