All Products
Search
Document Center

Error 1045 (28000): Access denied for a user

Last Updated: Jun 20, 2019

Symptom

When you connect to an RDS for MySQL instance, the following error is reported:

ERROR 1045 (28000): Access denied for user ‘XXX’@’XXX’ (using password: YES)

Cause and Solution

In most cases, this error is caused by an incorrect username or password.

  • RDS does not provide a root user. You need to create a root account. For detailed steps, see Create accounts and databases.

  • If the password contains a special character, you need to include this special character into a pair of single quotation marks (‘), for example, -p ‘password’.

  • If you forget the password, you can log on to the Alibaba Cloud console and navigate to the account management page to change the password.

    The new password may take a few minutes to take effect.

s13

Similar error

When you connect to an RDS for MySQL instance, the following error may be reported because the user password is not filled in the connection information:

ERROR 1045 (28000): Access denied for user ‘XXX’@’XXX’ (using password: NO)