Error establishing a database connection

Did you verify the database hostname in the wp-config.php file with that in the vPanel? Sometimes it may set something else. Can you share the screenshot of the wp-config.php file. Make sure to hide/blur the password.