Overview
OceanBase Developer Center (ODC) allows you to create private and public connections. A private connection is created in ODC by a user who obtains the database access information that is not shared with all users for the sake of security. The administrator can create public connections in ODC, and combine multiple public connections to create resource groups. In this way, users in a resource group can use the public connections in this group.
Log on to ODC as the administrator, and go to the Public Resource Console page. In the left-side navigation pane, choose Resource Permissions > Public Connection to display the Public Connections page.
Create a public connection
Create a single public connection
Click Create Public Connection in the upper-right corner of the Public Connections page. The Create Public Connection panel appears.
Specify the following parameters in the Create Public Connection panel.
| Field | Description |
|---|---|
| Connection Name | Specify the name of the connection. |
| Resource Group | Click the field and select the resource group from the drop-down list. For more information about resource groups, see Manage resource groups. |
| Connection Status | By default, the connection status is Enabled . You can set it to Disabled . A disabled connection cannot be accessed. |
| Intelligent Parsing | You can paste a connection string to the field. ODC automatically identifies the string and fills in the corresponding fields on the page. |
| Connection Type | Select MySQL or Oracle . Logical databases support only the MySQL mode. |
| Endpoint |
Note |
| Read/Write Account | Specify the Database Username and Database Password for accounts that have permissions to read and write the database. An ODC user with the read/write permissions can use this account to access OceanBase Database. You can click Test Connection next to the password field to test the connection to the target database. |
| Read-only Account | Specify the Database Username and Database Password for accounts that have only permissions to read the database. An ODC user with the read-only permissions can use this account to access OceanBase Database. You can click Test Connection next to the password field to test the connection to the target database. |
| Default Database | When you connect to a database in a MySQL tenant, you must specify the default database for the connection. You do not need to specify this field when you connect to a database in an Oracle tenant. |
| Query Tenant Views with sys Tenant Account | When Database Type is set to Physical Database, you can specify an account that has the privilege to query the SYS tenant view, and the password. This field is automatically populated when SYS is specified as the tenant in Endpoint.
|
| Enable SSL | Select whether to enable the SSL encrypted SSL link to ensure the safe transmission of data between the client and the server.
Note |
After you specify the preceding information, click Create in the lower-right corner of the panel. The connection is created.
Notice
After you click Create, a warning message will appear in the following cases:
- The read/write account is disconnected.
- The read/write account has insufficient permissions.
- The read-only account is disconnected.
- The read-only account has insufficient permissions.
Import multiple public connections at a time
ODC V4.1.2 and later allows you to import multiple public connections at a time by uploading a configuration file. Perform the following steps:
Log on to ODC and click Batch Import on the Public Connection tab.

In the Batch Import panel, click Download Template, and specify the parameters of the public connections to be imported.

Parameter Description Connection Name Required. The name of the connection. The name cannot contain spaces and must be unique. Resource Group Name Optional. The name of the resource group to be created in ODC. Separate multiple resource group names with commas (,). Connection Status Required. Valid values: true and false. Connection Type Required. Valid values: OB Oracle, OB MySQL, Cloud OB Oracle, Cloud OB MySQL, and ODP(Sharding) OB MySQL. Host IP Required. The IP address of the server where the target database is located.
You can obtain the host IP address from the details page of the tenant in which the target database is located, such as a tenant created on Alibaba Cloud or in OCP.Port Required. The port number of the server where the target database is located.
You can obtain the port number from the details page of the tenant in which the target database is located, such as a tenant created on Alibaba Cloud or in OCP.Cluster Optional. The name of the cluster where the target database is located. This parameter is not required for logical databases. Tenant Required. The name of the tenant in which the target database is located. This parameter is not required for logical databases.
The tenant name cannot contain spaces.Username Required. The database username of accounts that have the privileges to read and write the database. An ODC user with the read/write privileges can use this account to access OceanBase Database. Save Password Required. Valid values: true and false. Password The database password of accounts that have privileges to read and write the database. An ODC user with the read/write privileges can use this account to access OceanBase Database. Read-only Account Required. The database username of accounts that have the privilege to only read the database. An ODC user with the read-only privilege can use this account to access OceanBase Database. Password of Read-only Account Required. The database password of accounts that have the privilege to only read the database. Default Database Optional. When you connect to a database in a MySQL tenant, you must specify the default database for the connection. You do not need to specify this parameter when you connect to a database in an Oracle tenant. **Note **
If you leave this parameter unspecified in MySQL mode, the information_schema database is connected by default. However, if the connection to the information_schema database fails, you need to specify a database that can be accessed by the current user.Sys Tenant Account Optional. The account that has the privilege to view the sys tenant views. Sys Tenant Password Optional. The password of the account. 
Click the file pool in the Batch Import panel to open the file explorer and select the file to be imported. You can also directly drag the file to the file pool to upload it.
Click Import. After the connections are imported, you can view them in the list of public connections.
Manage public connections
The information of public connections is displayed in a list on the Public Connections page. On this page, you can perform the following operations:
Use the search icon
above the list to find the target connection.Use
to filter connections by type, authority, and label. Button The refresh button can refresh the list information.Use
to filter connections by type, authority, and label. Button The refresh button can refresh the list information.Refresh the list information through
.Adjust the column width of the connection list.
Public connection list
The information of public connections is provided by columns, which are described in the following table. A filter is provided on top of some columns for you to filter connections.
| Field | Description |
|---|---|
| Connection ID | The sequence number of the connection. You can click Connection ID to sort the connection IDs in ascending or descending order. |
| Connection Name | The name of the connection and the host and port information. You can click the name of a connection to go to the corresponding connection management page. The icon before the connection name indicates the status of the connection. Blue indicates valid, red indicates invalid, and gray indicates that the database password is not saved. You can click Connection Name to sort the connection names in ascending or descending order. |
| Cluster | The cluster information. You can click the filter icon to filter the cluster information. If you select Empty , you can filter connections that do not belong to any clusters. |
| Tenants | The tenant information. You can click the filter icon to filter the tenant information. If you select Empty , you can filter connections that do not belong to any tenants. |
| Resource Group | The name of the resource group to which the connection belongs. You can click the filter icon to filter the connections by the resource group. If you select Empty , you can filter connections that do not belong to any resource groups. |
| Status | The current connection status. Valid values: Enable/Disable . You can click the filter icon to filter the connections by status. |
| Operation Time | The last time when the connection was edited, or the time when the connection was created if the connection has not been edited. |
| Actions | The actions you can take. Valid values: View , Edit , Copy , and Disable / Enable .
|
View a public connection
Click View in the Actions column. The Public Connection Information panel appears. You can see the Connection Details and Related Users tabs.
| Field | Description |
|---|---|
| Connection Details | * Connection information: displays the information you specified when you created the connection in fields such as Region , Connection Mode , Connection Name , Resource Group , Endpoint , database username for Read/Write Account/Read-only Account, and Query sys Tenant Account . * Operation information: displays information in fields such as Created By , Created At , and Updated At . * User deletion: You can click Delete Public Connection on the tab to delete the current connection. After the connection is deleted, it is inaccessible to users who are granted the permissions to access it. |
| Related Users | Displays the information about the users who can access the current public connection in fields such as Name , Role , and Permissions . |
| Edit | In the lower-right corner of the Public Connection Information panel, you can click Edit to go to the Edit Public Connection panel. |
Edit a public connection
Click Edit in the Actions column of the public connection information list. The Edit Public Connection panel appears.
The Edit Public Connection panel displays all the parameters you specified when you created the connection. Database Type , Region , and Connection Mode cannot be modified after the connection is created.
After the editing is complete, click Save .
to filter the cluster information. If you select Empty , you can filter connections that do not belong to any clusters.