All Products
Search
Document Center

:You are prompted that the username or password used to log on to the database is incorrect when you log on to the MySQL database through DMS

更新時間:May 20, 2022

Problem description

When you log on to the MySQL database through DMS, the following error message is displayed.

The username or password used to log on to the database is incorrect.

Cause

May be caused by the following reasons:

  • Database account error:
    • MySQL database: the database account is not created in the RDS console. You log on to the database with an Alibaba Cloud account or a RAM user.
    • For a user-created MySQL database, you must log on to the database with your Alibaba Cloud account or RAM account.
  • The database password is incorrect.

Solution

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.

Select the following steps based on the on-site conditions:

  • Database account error:
    • You can create a database account in the apsaradb for RDS console. For more information, see create an account.
    • Execute SQL statements to create and authorize a database account.
      CREATE USER '[$User]'@'%' IDENTIFIED BY '[$Password]';
      grant all privileges on *.* to '[$User]'@'%' identified by '[$Password]' with grant option;
      Description
      • [$User] is the account name.
      • [$Password] is the account Password.
  • Make sure that the password is correct.

Application scope

  • Data Management
  • ApsaraDB RDS for MySQL