You can connect to Oracle and MySQL tenants of OceanBase Database through OceanBase Developer Center (ODC).
Prerequisites
You have installed ODC.
You can contact OceanBase Technical Support to obtain the ODC installation package. For information about how to install ODC, see ODC Deployment Guide.
You have obtained the OceanBase Database connection string from the deployment engineers.
Information in the connection string is required when you connect to the database through ODC.
Considerations
When you connect to OceanBase Database through ODC, you can connect only to the database under the current tenant.
Procedure
Note
The graphic user interface (GUI) varies with the ODC version. This topic takes ODC V3.2.0 as an example. For other ODC versions, see the ODC User Guide of the corresponding version.
Log on to ODC.
The ODC homepage appears, and the Private Connection tab is displayed on the ODC homepage.
In the upper-right corner of the Private Connection tab, click Create Connection.
On the page that appears, specify the information about the database to be connected.
You can specify basic configurations of a database connection in two ways:
Specify the information in the following table based on the OceanBase Database connection string:
mysql -hhost name-Pport number-udatabase username@tenant name#cluster name-Ddefault database-p 'database password'.Copy the connection string to the Intelligent Parsing field. ODC automatically recognizes the connection string and populates the connection information.
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 The name of the connection. Set Tag Add a description for the connection.
Click the Set Tag button after Connection Name to set a tag for the current connection. You can set and manage tags in the drop-down list that appears.- Tag setting: Select a tag from the drop-down list. Create tags first if the list is empty.
- Tag management: Click Create Tag at the bottom of the list or the settings icon above the list to pop up the Tags window. In the Tags window, you can edit or delete created tags. You can also click the Create Tag button to set a name or color for the new tag.
Endpoint - Host Name: the IP address of the server where the target database is located.
- Port: the port number of the server where the target database is located.
- Cluster: the name of the cluster where the target database is located.
- Tenant: the name of the tenant in which the target database is located.
Default Database When you connect to a database under 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 under an Oracle tenant. Database Username An account under the tenant. In MySQL mode, this account must have the privilege to access 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. An error will be reported if the configuration information such as the username, password, or network settings are invalid.Save Database Password If you disable this option, the database password for the connection is not saved. Each time you use or test a connection, you must enter the database password in the password dialog box to use the connection.
If you enable this option, the database password for the connection is saved. You do not need to enter the database password each time you use the connection.Intelligent Parsing You can paste a connection string to the field. ODC automatically identifies the string and fills in the corresponding value. SQL Query Timeout Value This option appears after you click Advanced Configuration. 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 option appears after you click Advanced Configuration. When Tenant under Endpoint is set to sys, this option is automatically populated.- Account: an account having the privilege to check the views under the
systenant. - Password: the password of the account.
After you specify the account and password, click Test Connection next to the password field to verify whether the account information is valid.
Note
In ODC V2.3.0 and later versions, to use the import and export features and check the partition information, you must configure theroot@sysaccount in this field.
Click Save to save the current configuration in the ODC connection list.
In the connection list, click the name of the connection that you saved or click Open in the Actions column to log on to OceanBase Database.
More information
For more information about how to connect to and use OceanBase Database through ODC, see the ODC User Guide of the corresponding version.