AnalyticDB for MySQL allows you to associate resource groups with database accounts to implement resource isolation between database accounts. After you associate a resource group with a database account, SQL queries corresponding to the database account are routed to the resource group. This topic describes how to associate a resource group with a database account and disassociate a resource group from a database account for an AnalyticDB for MySQL cluster.
Prerequisites
A resource group is created. For more information, see Create a resource group.
Background information
AnalyticDB for MySQL allows you to associate resource groups with database accounts. This way, compute jobs can be executed based on priority, and core business is not affected by complex computing scenarios or unexpected exceptions. Queries are classified and allocated with appropriate resources to maximize cluster performance. If you did not specify a resource group to execute queries by adding a hint to SQL statements, you can use the resource group that is associated with your database account to execute queries. For more information, see Specify a resource group to execute queries.
Usage notes
You cannot associate the user_default resource group with a database account.
Association rules
Each database account can be associated with only one resource group, and each resource group can be associated with one or more database accounts.
If a database account is not associated with a custom interactive resource group, the database account is associated with the default resource group.
When you delete a resource group, the resource group is disassociated from the database accounts.
When you delete a database account, the database account is disassociated from the resource group.
Procedure
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. On the Clusters page, click an edition tab. Find the cluster that you want to manage and click the cluster ID.
In the left-side navigation pane, choose Cluster Management > Resource Management. On the Resource Management page, click the Resource Groups tab.
On the Resource Groups tab, find the resource group that you want to manage and click Associate with Database Account in the Actions column.
In the panel that appears, select the database account with which you want to associate the resource group from the Username drop-down list and click Associate with Database Account. In the message that appears, click OK.
To associate the resource group with other database accounts, repeat Step 4.
To disassociate the resource group from a database account, click Disassociate in the Actions column corresponding to the database account in the Associate with Database Account panel. In the message that appears, click OK.