The most common cause is the wrong login data in the wp-config.php file. For resolving, we will make sure that the data in the following fields are correct:
define('DB_NAME', 'Database name');
define('DB_USER', 'Database user');
define('DB_PASSWORD', 'User password');
This data must be the same as those set in the control panel.
Another cause of this error message is the depletion of the resources allocated to the hosting package. To resolve this, you will need to optimize your WordPress application and/or think about a higher hosting package.