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 | ****** |
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.
Log on to ODC and choose Data Source > Create Data Source > OceanBase MySQL.
In the Create Data Source panel, specify the following parameters:
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
.After you specify the preceding information, clickSavein the lower-right corner of the panel.
After the data source is created, you can view the data source in the data source list.
Create an object storage data source
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.
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.
Log on to ODC and choose Data Sources > Create Data Source> Alibaba Cloud OSS.
In the Create Data Source panel, specify the following parameters:
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.
After you specify the preceding information, clickSavein the lower-right corner of the panel.
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
Click Instances in the left navigation pane of OceanBase console, and select the target instance in Instance List.
Click Log on to the database in the Tenant Workspace.
Select the database account and click OK to jump to ODC.
A private connection named as the current instance and user name will be created automatically after entering the database account password and clicking OK.