Associate or disassociate a database account
This topic describes how to associate and disassociate database accounts with resource groups in an AnalyticDB for MySQL cluster.
Prerequisites
You have created a resource group.
Background
AnalyticDB for MySQL allows you to associate different database accounts with different resource groups. This provides resource isolation to prioritize computing tasks and protect core services from complex computations or unexpected events. You can also classify queries and allocate resources more efficiently to maximize cluster performance.
Association rules
-
You cannot associate database accounts with the user_default resource group.
-
A database account can be associated with only one resource group. A resource group can be associated with multiple database accounts.
-
If a database account is not associated with any custom resource group, it is automatically associated with the default resource group.
-
When you delete a resource group or a database account, the association between them is automatically removed.
Procedure
Enterprise, Basic, or Lakehouse
Using the console
Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. Find the cluster that you want to manage and click the cluster ID.
-
On the Cluster Management > Resource management > Resource Group Management page, find the target resource group. In the Actions column, click .
-
From the Database Account drop-down list, select a database account and click Associate with Account. In the confirmation dialog box, click OK.
Note-
You can associate only one database account at a time. To associate multiple accounts, repeat this step.
-
If the drop-down list is empty, you must first create a database account.
-
-
If you need to disassociate a database account, click Disassociate to the right of the target user in the Associate with Account list, and then click OK in the confirmation dialog box that appears.
Using API
Data Warehouse
Using the console
Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. Find the cluster that you want to manage and click the cluster ID.
-
In the navigation pane on the left, click Resource Group Management.
-
On the Resource Management page, find the target resource group and click Associate with Account in the Actions column.
NoteOn the Resource Management page, "user" refers to a database account.
-
From the Database Account drop-down list, select a database account and click Associate with Account. In the confirmation dialog box, click OK.
Note-
You can associate only one database account at a time. To associate multiple accounts, repeat this step.
-
If the drop-down list is empty, you must first create a database account.
-
-
If you need to disassociate a database account, click Disassociate to the right of the target user in the Associate with Account list, and then click OK in the confirmation dialog box that appears.