Error message: Access denied for user "username"@"hostname" (Using password: YES) (1045)
This error occurs when
- a MySQL server gets an incorrect password for the username specified, or
- the correct password is provided, but the user hasn't been granted access from the specific client host.
This is a common error, as MySQL access is restricted by client host combined with the username & password credentials, and access has to be specifically granted as detailed in the MySQL documentation.