AnalyticDB for MySQL supports two types of database accounts: privileged accounts and standard accounts. You can use a privileged account to manage all the standard accounts and databases. For standard accounts, you must manually create them and grant permissions to perform database operations.
Account types
AnalyticDB for MySQL supports two types of database accounts: privileged accounts and standard accounts. The following table describes the differences between privileged accounts and standard accounts.
Account type | Description |
---|---|
Privileged account |
|
Standard account |
|
Create a privileged account
- Log on to the AnalyticDB for MySQL console.
- In the upper-left corner of the page, select a region.
- In the left-side navigation pane, click Clusters.
- Click the Data Lakehouse Edition (V3.0) or Data Warehouse Edition (V3.0) tab based on your cluster type.
- Find the cluster that you want to manage and click its ID.
- In the left-side navigation pane, click Accounts.
- For a Data Warehouse Edition (V3.0) cluster, click Create Privileged Account. For a Data Lakehouse Edition (V3.0) cluster, click Create Account.
- In the Create Privileged Account or Create Account panel, configure the parameters described in the following table.
Parameter Description Account The name of the privileged account. Enter a name that meets the on-screen requirements. Account Type - For a Data Warehouse Edition (V3.0) cluster, this parameter is automatically set to Privileged Account.
- For a Data Lakehouse Edition (V3.0) cluster, select Privileged Account.
New Password The password of the privileged account. Enter a password that meets the on-screen requirements. Confirm Password Enter the password of the privileged account again. Description Optional. The description that is used to identify the account for future management. - Click OK.
Reset the password of a privileged account
On the Accounts page, find the privileged account and click Change Password in the Actions column. In the dialog box that appears, enter and confirm a new password as prompted, and then click OK.
Create and grant permissions to a standard account
Console operations
You can create and grant permissions to a standard account in the console only for Data Lakehouse Edition (V3.0) clusters.
- Log on to the AnalyticDB for MySQL console.
- In the upper-left corner of the page, select a region.
- In the left-side navigation pane, click Clusters.
- On the Data Lakehouse Edition (V3.0) tab, find the cluster that you want to manage and click its ID.
- In the left-side navigation pane, click Accounts.
- Click Create Account.
- In the Create Account panel, configure the parameters described in the following table.
Parameter Description Account The name of the standard account. Enter a name that meets the on-screen requirements. Account Type Select Standard Account. New Password The password of the standard account. Enter a password that meets the on-screen requirements. Confirm Password Enter the password of the standard account again. Description Optional. The description that is used to identify the account for future management. - Click OK.
- Find the created account and click Permissions in the Actions column to grant permissions to the account.
SQL statements
- For more information about how to create a database account, see CREATE USER.
- For more information about how to grant permissions to a database account, see GRANT.
- For more information about how to revoke permissions from a database account, see REVOKE.
- For more information about how to change the name of a database account, see RENAME USER.
- For more information about how to delete a database account, see DROP USER.