Make sure your configuration for database name, host name, username & password matches with the configuration on the database.
Make sure the username & password matches.
Make sure that the account you're trying to use to run the queries (loading the website rather...) has the rights to all of the privileges in the database.