This topic describes some basic operations for using web OceanBase Developer Center (ODC).
Edit a user
Example: Edit a user named SUB_CLOUD_2******* in ODC as the administrator and assign the system_admin role to the user.
Log on to web ODC. In the left-side navigation pane, click Users.

Click Edit in the Actions column. On the Edit User page that appears, specify roles for the user.
NoteThis parameter is optional. You can assign multiple roles to a user. Click the field. In the drop-down list, select the roles that you want to assign to all users that you have created.
If no role is available, create one.
Parameter
Description
Account
The account used to log on to ODC. You must specify the account and it must be unique. The account must be 4 to 48 characters in length and can contain letters, digits, underscores (_), and special characters. Supported special characters are . _ + @ # $ %.
Name
The screen name to be displayed after the user logs on to ODC. The name must be specified and cannot exceed 110 characters in length.
Password
The password used to log on to ODC. The password must be specified. It must be 8 to 32 characters in length and contain at least two digits, two uppercase letters, two lowercase letters, and two special characters. Supported special characters are . _ + @ # $ %. You can also click Random Password next to the field to generate a random password.
Account Status
Specifies to enable or disable the user account.
Click Save.
Create a data source
A new user with the AdministratorAccess or AliyunOceanBaseFullAccess permission is automatically assigned the system_admin role when the user logs on to ODC for the first time.
A user that logs on to ODC again is not automatically assigned the system_admin role. You can assign the system_admin role to the user in ODC.
By default, the system_admin role is assigned to the Alibaba Cloud account.
When you use a Normandy account, you can log on to ODC and use the individual workspace only as the administrator.
Example: Create an OceanBase data source in MySQL-compatible mode in ODC.
Parameter | Example value |
Data source name | mysql4.2.4 |
Cluster name | ob 4.2.2 |
Tenant name | mysql_tenant |
Database username | odc |
Database password | ****** |
Log on to web ODC. In the left-side navigation pane, click Data Sources. On the page that appears, click Create Data Source.

In the Create Data Source panel, specify parameters in the following table.

Parameter
Description
Endpoint
The database instance. You can select a cluster instance or a tenant instance.
Database Account
Database User Name: the username of an account created in the tenant. In MySQL-compatible mode, this account must have the permission to access the default database.
Database Password: the password of the account created in the tenant. You can click Test Connection next to the password field to check the connection to the target database.
Environment
The type of the environment, which can be dev (development), sit (system integration test), or prod (production).
Click OK in the lower-right corner of the panel. In the dialog box that appears, enter a connection name.

Create a project
You must assign the system_admin role to the user.
Grant the project creation permission to the user as the ODC system administrator.

In the left-side navigation pane, click Projects. On the All Projects tab, click Create Project.

In the Create Project panel, specify parameters in the following table.

Parameter
Description
Project Name
The name of the project.
Administrator
A user with all permissions within the project.
DBA
A user with all permissions within the project except for member management, message configuration, and project settings.
Developer (optional)
A user that can log on to all databases, execute SQL statements, and submit tickets.
Security Administrator (optional)
A user that can manage sensitive columns, apart from the permissions of a participant.
Participant (optional)
A user that can view basic project information, apply for database permissions, and submit tickets.
Description (optional)
The description of the project.
Click OK.
NoteIf the user does not have the permission to create projects, you can choose Projects > Join Project or click Tickets and then click Project Permission Application to join an existing project. For more information, see Project collaboration management.
Add databases to a project
Example: Create a database named odc_test in the odc_4.3.x project.
Choose Projects > All Projects. On the page that appears, click the project name odc_4.3.x.

On the Databases tab, click Add Database.

In the Add Database dialog box, select the data source mysql4.3.x and the database odc_test and then click OK.

On the Databases tab, view the odc_test database.
You can click the edit box in the remarks column to add notes for the database, facilitating its usage.
NoteOnly the administrator and DBA of a project can modify the remarks of databases in the project.

On the Databases tab, click the database name odc_test, SQL Console in the upper-right corner, or Log on to Database in the Actions column to access the database.
NoteYou can also click Batch operation to modify multiple databases at a time, apply for database permissions, or set database administrators.

Go to the SQL development window.

Write and execute SQL statements
Example: In the SQL window, create a table in the database of the target project.
In the record of the odc_4.3.x project, click Log on to Database in the Actions column to go to the SQL development window.

In the SQL window, write the following SQL statement to create a table named
employee:
CREATE TABLE odc_test.employee ( emp_no int(120) COMMENT 'Employee ID' NOT NULL, birthday date COMMENT 'Birthday' NULL, name varchar(120) COMMENT 'Employee name' NULL, CONSTRAINT cons_employee_empno PRIMARY KEY (emp_no)) DEFAULT CHARSET = utf8mb4 COLLATE = utf8mb4_general_ci;As shown in the preceding figure, you can click
to switch the database. Click Run F8 in the toolbar to execute all SQL statements in the current SQL window.
Icon
Description
Run F8
Click this icon to run all SQL statements in the current SQL window.
Run Current Statement F9
Click this icon to run all selected SQL statements or the statement in the line where the pointer is hovering.
Abort
Click this icon to abort the running statements.

On the results tab, view the execution records and logs.
NoteIf you do not have permissions on the table, you can click Apply for Table/View Permissions on the Tickets tab to apply for query, export, and change permissions on the table.

Create a database change task
Example: Change the value of name from xiaoguo to xiaofeng in the employee table of the odc_test database.
Choose Projects > All Projects. On the page that appears, click the project name odc_4.3.x.

On the Tickets tab, choose Database Change > Create Database Change.

In the Create Database Change panel, specify the following information:

Click Create.
Choose Tickets > Database Change to view the task review result and task information.
