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).
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.
Go to the Instances page. In the top navigation bar, select the region where the instance resides. Find the instance and click its ID.
In the navigation pane on the left, click Accounts.
Find the account to delete and click Delete in the Actions column.
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.
In the top navigation bar, choose SQL Console.
Run the following SQL statement to delete the account:
DROP USER 'username';Click Execute.
FAQ
Next steps
API reference
| API operation | Description |
|---|---|
| DeleteAccount | Deletes a database account from an RDS instance |
| CreateAccount | Creates a database account on an RDS instance |