All Products
Search
Document Center

AnalyticDB for MySQL:Associate with or disassociate from a database account

Last Updated:Mar 11, 2024

AnalyticDB for MySQL Data Warehouse Edition (V3.0) in elastic mode for Cluster Edition 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 Data Warehouse Edition (V3.0) cluster in elastic mode for Cluster Edition.

Prerequisites

A resource group is created. For more information, see Create a resource group.

Background information

AnalyticDB for MySQL Data Warehouse Edition (V3.0) in elastic mode for Cluster Edition 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. For more information about resource groups, see Resource group overview.

For example, you want to use Database accounts A and B in an AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster in elastic mode for Cluster Edition to perform simple queries, and Database account C to perform complex queries and analysis on large amounts of data. In this case, you can associate an interactive resource group named source_a with Database accounts A and B, and a batch resource group named source_b with Database account C. This way, Database accounts A and B can perform simple queries as expected when Database account C performs complex queries and analysis on large amounts of data.

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 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

  1. Log on to the AnalyticDB for MySQL console.
  2. In the upper-left corner of the page, select a region.
  3. In the left-side navigation pane, click Clusters.
  4. On the Data Warehouse Edition (V3.0) tab, find the cluster that you want to manage and click the Cluster ID.

  5. In the left-side navigation pane, click Resource Groups.

  6. On the Resource Groups page, find the resource group that you want to manage and click Associate with Database Account in the Actions column.

  7. 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.

  8. To associate the resource group with other database accounts, repeat Step 7.

  9. 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.