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, combine multiple public connections to create resource groups, and grant the access permission of public connections or resource groups to specific roles.
Log on to ODC as the administrator, and go to the Public Resource Console page. In the left-side navigation pane, choose Resource Management > Public Connections to display the Public Connections page.
Create a public connection
In the upper-right corner of the Public Connections page, click Create Public Connection . The Create Public Connection panel appears.
In the Create Public Connection panel, specify the following fields.
| Parameter | Description |
|---|---|
| Region | Select Public Cloud if your database instance is deployed on Alibaba Cloud, or select Independent Deployment/Apsara Stack if your database instance is deployed in your own environment. |
| Connection Mode | Select MySQL or Oracle . |
| Connection Name | Specify the name of the connection. |
| Resource Group | Click the field and select the resource groups from the drop-down list. For more information about the resource group, 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. |
| Endpoint | * Host Name : the host name, which you can find on the tenant information page. * Port : the port number, which you can find on the tenant information page. * Cluster : the name of the cluster in which the database you want to connect to is located. * Tenant : the name of the tenant under which the database you want to connect to is located. |
| Read/Write Accounts | Specify the Database Username and Database Password for accounts that have privileges to read and write the database. An ODC user with the read/write permissions can use this account to access OceanBase Database. |
| Read-only Accounts | Specify the Database Username and Database Password for accounts that have only privileges to read the database. An ODC user with the read-only permissions can use this account to access OceanBase Database. |
| SQL Query Timeout Value | You can specify a timeout value for SQL queries. A query whose execution time exceeds the timeout value is automatically terminated. The default timeout value is 60 seconds. |
| Query sys Tenant View | This field is automatically populated when Tenant in Endpoint is specified as sys. * Account : an account that has the privilege to check the views under the sys tenant. * Password : the password of the account. After you specify the account and password, you can click Test Connection next to the password field to verify whether the account information is valid. In ODC V2.3.0 and later versions, to use the import and export features and check the partition information, you need to configure the root@sys account by using this option. |
After you specify the preceding information, click Create in the lower-right corner of the panel. The connection is created. Notice
A warning message will appear in the following cases:
The read/write account is disconnected.
The read/write account has insufficient privileges.
The read-only account is disconnected.
The read-only account has insufficient privileges.
Manage public connections
The Public Connections page lists all the connections you created. You can enter a keyword in the search box above the list to search for a connection.
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.
| Parameter | 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, port, cluster, and tenant 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. Green indicates valid, red indicates invalid, and gray indicates that the database password is not saved. |
| Mode | The mode of the connection. Valid values: Oracle and MySQL . |
| Resource Group | The name of the resource group to which the connection belongs. |
| Status | The status of the connection. Valid values: Enabled and Disabled . |
| 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 | Indicates the actions you can take, including View , Edit , and Disable / Enable . You can click Disable / Enable in the Actions column to change the status of the connection. |
View a public connection
Click View in the Actions column. In the Public Connection Information panel, you can see the Connection Details and Related Users tabs. The following table describes the information displayed on the tabs.
| Parameter | Description |
|---|---|
| Connection Details | * Connection Information: displays the information you specified when you created the connection in fields such as Region , Connection Mode , Connection Name , Endpoint , Database Username , SQL Query Timeout Value , and Query sys Tenant View . * Operation information: displays information in fields such as Created By , Created At , and Updated At . * Delete users: 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 to go to the Edit Public Connection panel. The Edit Public Connection panel displays all the parameters you specified when you created the connection. Region and Connection Mode cannot be modified after the connection is created. Database Password for Read/Write Account and Read-only Account is not displayed. Notice
After the editing is complete, click Save . A warning message will appear in the following cases:
The read/write account is disconnected.
The read/write account has insufficient privileges.
The read-only account is disconnected.
The read-only account has insufficient privileges.