All Products
Search
Document Center

ApsaraDB RDS:Delete an account

Last Updated:Mar 28, 2026

Delete a privileged or standard account from an ApsaraDB RDS for MySQL instance when it is no longer needed. You can delete accounts in the console, by calling an API operation, or by running SQL statements in Data Management (DMS).

Warning

Deletion is permanent and cannot be undone. Before proceeding, confirm that no applications or services still rely on the account.

Prerequisites

Before you begin, ensure that you have:

  • An ApsaraDB RDS for MySQL instance

  • The permissions required to manage accounts on the instance

Delete an account in the console

This method works for both privileged and standard accounts.

  1. Go to the Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.

  2. In the navigation pane on the left, click Accounts.

  3. Find the account to delete and click Delete in the Actions column.

  4. In the dialog box that appears, click OK.

Delete a standard account using SQL statements

SQL statements can only delete standard accounts. To delete a privileged account, use the console method above.
  1. Log on to the RDS instance using DMS.

  2. In the top navigation bar, choose SQL Console.

  3. Run the following SQL statement to delete the account:

    DROP USER 'username';
  4. Click Execute.

FAQ

Account deletion error

Problem

When you delete a user on the Account Management page of the ApsaraDB RDS for MySQL console, the console can only delete accounts whose host value is set to % (all hosts). If the account was created manually with a specific host restriction — for example, 'username'@'10.10.10.1' or 'username'@'10.%.%.%' — the console deletion fails with this error:

Failed to delete the account. Check the request or the input parameters. Other threads in the instance may be waiting for the lock or the host value of the current database account is not set to % (allows logins from all hosts).

Solution

To fix this, use the DROP USER command instead. First, check the account's host value:

SELECT user, host FROM mysql.user WHERE user = 'username_to_delete';

Then delete the account by specifying the exact host:

DROP USER 'username_to_delete'@'target_host_IP_or_network_segment';

Next steps

API reference

API operationDescription
DeleteAccountDeletes a database account from an RDS instance
CreateAccountCreates a database account on an RDS instance