Permission settings
Permission Settings is a visual tool for managing user and role permissions in ApsaraDB for SelectDB. You can use this tool to easily add, delete, modify, and query database users and roles. This topic describes how to use the Permission Settings feature of ApsaraDB for SelectDB.
Prerequisites
You have created an ApsaraDB for SelectDB instance. For more information, see Create an instance.
The instance version is 3.0.7 or later.
You are familiar with the concepts of users and roles. For more information, see Basic permission management.
Procedure
Log on to the ApsaraDB for SelectDB console.
In the upper-left corner, select the instance's region.
On the Instances page, click the Instance ID of your instance to open the Instance Details page.
In the upper-right corner of the page, click Data Development and Management.
NoteThe first time you use Data Development and Management, you are prompted to add your local public IP address to the webui_whitelist group. After reviewing the prompt, click OK.
From the drop-down list, select Permission Settings.
NoteIf you are not logged into the WebUI system when you first use Permission Settings, you are redirected to the logon page.
Log on as the admin user.
If you have forgotten the admin password, reset it. For more information, see Reset an account password.
By default, the User tab is selected. The list displays all users in the ApsaraDB for SelectDB instance except for the root user.
On the Permission Settings page, you can manage database users and roles as follows:
User management
Click User in the navigation pane on the left to perform the following operations:
ImportantThe admin user cannot be deleted.
The roles and permissions of the admin user cannot be modified.
Only users with the ADMIN permission can edit roles, change passwords, delete users, and modify permissions for users other than the admin user.
Create a user: Click Add User in the upper-left corner. In the Add User dialog box, configure the following parameters and click OK.
Parameter
Required
Description
Example
User Name
Yes
The name of the user.
test_account
Host
No
The IP address from which the user can connect.
127.0.0.1
Password
Yes
The password for the user.
N/A
Belongs to Role
No
One or more roles to assign to the user.
admin
Edit roles for a user: In the Actions column for the user, choose
> Edit Role. In the Edit User dialog box, select one or more roles from the Granted Role list and click OK.Change a user's password: In the Actions column for the user, choose
> Change Password. In the Change Password dialog box, enter the new password in the New Password field and click OK.Delete a user: In the Actions column for the user, choose
> Delete User. In the confirmation dialog box, click OK.NoteA deleted user cannot be recovered.
Modify user permissions:
Grant permissions
Click the Username to open the permission settings page.
Find the desired permission type and click Add Permission. In the dialog box, select the permissions to grant and click OK.
NoteIf you are not familiar with database permissions, see Basic permission management.
Revoke permissions
Click the Username to open the permission settings page.
In the last column of the table for the target permission type, click
. In the Revoke dialog box, select the permissions to revoke and click OK.
NoteIf you are not familiar with database permissions, see Basic permission management.
Role management
Click Role in the navigation pane on the left to perform the following operations:
ImportantThe admin role cannot be deleted.
Only users with the ADMIN permission can delete roles and modify permissions for other roles (excluding the admin role).
Create a role: Click Add Role in the upper-left corner. In the Add Role dialog box, enter a role name in the Name field and click OK.
Delete a role: In the Actions column for the role, click the delete icon. In the confirmation dialog box, click OK.
Modify role permissions:
Grant permissions
Click the role name to open the permission settings page.
Find the desired permission type and click Add Permission. In the dialog box, select the permissions to grant and click OK.
NoteIf you are not familiar with database permissions, see Permission management.
Revoke permissions
Click the role name to open the permission settings page.
In the last column of the table for the target permission type, click
. In the Revoke dialog box, select the permissions to revoke and click OK.
NoteIf you are not familiar with database permissions, see Permission management.