All Products
Search
Document Center

AnalyticDB:Associate or disassociate a database account with or from a RAM user

Last Updated:Aug 22, 2024

If you want to use a Resource Access Management (RAM) user to develop jobs or use a standard account to access Object Storage Service (OSS) external tables, you must associate your standard account with your RAM user. This topic describes how to associate or disassociate a standard account with or from a RAM user.

Prerequisites

  • An AnalyticDB for MySQL Data Lakehouse Edition cluster is created. For more information, see Create a cluster.

  • A standard account is created for the AnalyticDB for MySQL cluster. For more information, see Create a database account.

Usage notes

  • You can associate only standard accounts with RAM users. Privileged accounts cannot be associated with RAM users.

  • By default, privileged accounts are associated with Alibaba Cloud accounts.

Mapping scenarios between AnalyticDB for MySQL standard accounts and RAM users

  • SQL editor: When you log on to the SQL editor as a RAM user, you must map the RAM user to a standard account of AnalyticDB for MySQL to read and write tables.

  • Java Database Connectivity (JDBC) connection: When you use a standard account of AnalyticDB for MySQL to connect to a database in JDBC mode, you must map the standard account to a RAM user to read and write external tables such as OSS external tables.

  • Spark application: When you start a Spark application as a RAM user, you must map the RAM user to a standard account of AnalyticDB for MySQL to connect to the AnalyticDB for MySQL cluster.

Associate a database account with a RAM user

  1. 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 Data Lakehouse Edition tab, find the cluster that you want to manage and click the cluster ID.

  2. In the left-side navigation pane, click Accounts.

  3. On the User Accounts page, find the database account that you want to manage and choose RAM User > Associate in the Actions column.

  4. In the Associate with RAM User panel, enter a RAM user ID.

    Note

    You can go to the Users page of the RAM console and click the name of a RAM user to obtain the UID of the RAM user. For more information, see View the information about a RAM user.

  5. Click OK.

Disassociate a database account from a RAM user

Find the database account that you want to manage and choose RAM User > Disassociate in the Actions column.