You can assign a role to a user in Oracle mode by using SQL statements or in the OceanBase Cloud Platform (OCP) console.
Assign a role by using SQL statements
To assign a role to a user, you must have a role and the ADMIN OPTION or GRANT ANY ROLE privilege.
For information about how to view your privileges, see View user privileges. If you do not have the required privilege, contact an administrator. For more information, see Modify user privileges. For more information about how to view your roles, see View roles.
The syntax for assigning a role to a user is as follows:
GRANT role_name TO grantee_user [WITH ADMID OPTION];
Some notes about this:
role_name: the name of the role. When you assign multiple roles to a user at a time, separate role names with commas (,).You can assign a role to multiple users at a time, or assign multiple roles to one or more users at a time.
WITH ADMIN OPTION: specifies that the assigned role can be assigned to other users, and role revocation does not extend to other users.
For example, assign the role1 role to the user2 user.
obclient> GRANT role1 TO user2;
Query OK, 0 rows affected
For more information about the GRANT statement, see GRANT.
Assign a role in the OCP console
You can assign an existing role to a user in the OCP console.
Prerequisites
The TENANT_MANAGER role is assigned to you. Otherwise, request the OCP administrator to assign the role. For more information, see "Edit a user" in the OCP User Guide of the corresponding version.
Procedure
Log on to the OCP console.
In the left-side navigation pane, click Tenants to go to the Tenants page.
In the tenant list, click a tenant whose Tenant Mode is Oracle to go to the Overview page.
In the left-side navigation pane, click User Management.
On the Users tab, find the user to which you want to assign a role and click the username to go to the details page of the user.
In the upper-right corner of the Roles section, click Modify Role.

In the dialog box that appears, select the role that you want to assign and click OK.