Bind database accounts to resource groups to control which computing tasks run in which group. This lets you isolate core workloads from complex or bursty queries and allocate cluster resources by priority.
Prerequisites
Before you begin, ensure that you have:
A resource group. See Create and manage resource groups.
Binding rules
Rule | Detail |
Accounts per resource group | Multiple |
Resource groups per account | One |
Default when unbound | Bound to the default resource group |
After deleting an account or resource group | Binding is removed automatically |
You cannot bind accounts to theuser_defaultorserverless defaultresource groups.
Bind or unbind a database account
Choose the section that matches your cluster edition.
Edition | Console steps | OpenAPI |
Enterprise, Basic, or Data Lakehouse | ||
Data Warehouse |
Enterprise, Basic, or Data Lakehouse Edition
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.
Go to Cluster Management > Resource Management > Resource Groups. Find the target resource group, and in the Actions column, click More > Associate with Account.
From the Database Account drop-down list, select an account, then click Associate with Account. In the confirmation dialog box, click OK.
Only one account can be bound at a time. To bind multiple accounts, repeat this step for each one. If the drop-down list is empty, no database accounts exist yet. Create a database account first.
To unbind an account, click Disassociate next to the account in the Associate with Account list, then click OK.
Using OpenAPI
BindDBResourceGroupWithUser — bind a resource group to a database account
UnbindDBResourceGroupWithUser — unbind a resource group from a database account
Data Warehouse Edition
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 left-side navigation pane, click Resource Group Management.
On the Resource Management page, find the target resource group and click Associate with Account in the Actions column.
From the Database Account drop-down list, select an account, then click Associate with Account. In the confirmation dialog box, click OK.
Only one account can be bound at a time. To bind multiple accounts, repeat this step for each one. If the drop-down list is empty, no database accounts exist yet. Create a database account first.
To unbind an account, click Disassociate next to the account in the Associate with Account list, then click OK.
Using OpenAPI
BindDBResourceGroupWithUser — bind a resource group to a database account
UnbindDBResourceGroupWithUser — unbind a resource group from a database account