All Products
Search
Document Center

ApsaraDB for OceanBase:Use web ODC

Last Updated:Oct 30, 2025

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.

  1. Log on to web ODC. In the left-side navigation pane, click Users.

    image.png

  2. Click Edit in the Actions column. On the Edit User page that appears, specify roles for the user.

    image.png

    Note
    • This 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.

  3. Click Save.

Create a data source

Important

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

******

  1. Log on to web ODC. In the left-side navigation pane, click Data Sources. On the page that appears, click Create Data Source.

    image.png

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

    image.png

    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).

  3. Click OK in the lower-right corner of the panel. In the dialog box that appears, enter a connection name.

    image.png

Create a project

Important

You must assign the system_admin role to the user.

  1. Grant the project creation permission to the user as the ODC system administrator.

    image.png

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

    image.png

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

    image.png

    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.

  4. Click OK.

    Note

    If 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.

  1. Choose Projects > All Projects. On the page that appears, click the project name odc_4.3.x.

    image.png

  2. On the Databases tab, click Add Database.

    image.png

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

    image.png

  4. 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.

    Note

    Only the administrator and DBA of a project can modify the remarks of databases in the project.

    image.png

  5. 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.

    Note

    You can also click Batch operation to modify multiple databases at a time, apply for database permissions, or set database administrators.

    image.png

  6. Go to the SQL development window.

    image.png

Write and execute SQL statements

Example: In the SQL window, create a table in the database of the target project.

  1. 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.

    image.png

  2. In the SQL window, write the following SQL statement to create a table named employee:

    image.png

    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 image.png to switch the database.

  3. 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.

    image.png

  4. On the results tab, view the execution records and logs.

    image.png

    Note

    If 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.

    image

Create a database change task

Example: Change the value of name from xiaoguo to xiaofeng in the employee table of the odc_test database.

  1. Choose Projects > All Projects. On the page that appears, click the project name odc_4.3.x.

    image.png

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

    image.png

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

    image.png

  4. Click Create.

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

    image.png

References