When you see such a message, it means that the DB connection settings in your script's configuration file are not valid for some reasons. The fix is to reset the password for MySQL user in your Cpanel > MySQL Databases to the one used in your configuration files. Where to find the configuration file of your script? You can find the names of the files with the DB connection settings of the most popular scripts below. If you face problems, please, contact support.
WordPress wp-config.php
Joomla configuration.php
Drupal settings.php