All Products
Search
Document Center

ApsaraDB for OceanBase:Create a private connection

Last Updated:Feb 24, 2025

Overview

You can create an OceanBase Developer Center (ODC) connection in the following ways:

  • Create a private connection on the ODC home page: After entering the ODC homepage, click Create Data Source button to create a private connection.

  • Create a private connection in the database instance: In the tenant instance workspace, click Log on to Database, enter your user name and password after jumping to ODC, and a private connection named as the instance and user name will be automatically created.

Procedure

Method 1: Create a data source in the ODC home page

Create an OceanBase data source

Example: Create an OceanBase data source in MySQL mode in ODC.

Parameter

Example value

Project name

odc_4.2.0

Data source name

obmysql4.2.0

Cluster name

odctest

Tenant name

mysql

Database username

odctest

Database password

******

  1. Log on to the OceanBase management console, click Data Development in the left-side navigation pane of the OceanBase console page to log on directly to the ODC.

    创建个人连接1-EN

  2. Log on to ODC and choose Data Source > Create Data Source OceanBase MySQL.

    image

  3. In the Create Data Source panel, specify the following parameters:

    image

    Parameter

    Description

    Endpoint

    Select a database instance, including cluster instance and tenant instance.

    Database Account

    • Database User Name: an account under the tenant. In MySQL mode, this account must have access to the default database.

    • Database Password: the password of the account under the tenant. You can click Test Connection next to the password field to check the connection to the target database.

    Environment

    You can select the environment type based on your needs. Valid values: dev, sit, and prod.

    Project

    You can choose to bind the created data source to the specified project. After the data source is bound to the project, the databases created in the data source are automatically moved to the project.

    Advanced Settings

    Startup Script: You can configure a connection session by using an SQL statement, such as set session ob_query_timeout=60000000.

  4. After you specify the preceding information, clickSavein the lower-right corner of the panel.

    image

  5. After the data source is created, you can view the data source in the data source list.

Create an object storage data source

Note
  • An OSS data source created in ODC supports only data archiving tasks.

  • ODC V4.3.3 and later supports data sources of the following object storage services: Alibaba Cloud OSS, Tencent COS, Huawei Cloud OBS, and AWS S3.

  1. Log on to the OceanBase management console, click Data Development in the left-side navigation pane of the OceanBase console page to log on directly to the ODC.

    创建个人连接1-EN

  2. Log on to ODC and choose Data Sources > Create Data SourceAlibaba Cloud OSS.

    image

  3. In the Create Data Source panel, specify the following parameters:

    image

    Parameter

    Description

    File URL

    The URL of the object file, such as oss://odc-sample/bucketname.

    Region

    Specifies the geographic region where data is stored.

    Access Key ID

    The AccessKey ID and AccessKey secret used to access the OSS data source.

    Environment

    The type of the environment. Valid values: dev (development), sit (system integration test), and prod (production).

    Project

    You can choose to bind the created data source to the specified project. After the data source is bound to the project, the databases created in the data source are automatically moved to the project.

  4. After you specify the preceding information, clickSavein the lower-right corner of the panel.

  5. After the data source is created, you can view the data source in the data source list.

Method 2: Create a private connection in a public cloud instance

  1. Click Instances in the left navigation pane of OceanBase console, and select the target instance in Instance List.

    新建个人连接方法1-1

  2. Click Log on to the database in the Tenant Workspace.

    新建个人连接方法2-6-EN

  3. Select the database account and click OK to jump to ODC.

    新建个人连接方法2-3

  4. A private connection named as the current instance and user name will be created automatically after entering the database account password and clicking OK.

    新建个人连接方法2-5

References