OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Developer Center

V4.1.0Community Edition

  • Document Overview
  • What's New
    • What's new
  • Overview
    • What is ODC?
    • Benefits
    • Architecture
    • Features
    • Limits
  • Quick Start
    • Overview
    • Install ODC
    • Log on to ODC with an account
    • Create a private connection
  • Tutorials
    • Tips on the SQL Console
    • Create a connection
    • Export data
    • Import data
    • Debug a stored procedure
    • View the performance of an SQL statement
  • User Guide (Web ODC)
    • Log on to ODC
      • Log on to ODC with an account
      • Change the password
    • ODC homepage
    • Connect to a database
      • Create a private connection
      • Manage private connections
    • Public resource management
      • Overview
      • Quick start
      • Resource permissions
        • Manage public connections
        • Manage resource groups
        • Manage roles
        • Manage users
        • Automatic authorization rules
      • Task process management
      • Manage operation records
      • Data desensitization management
      • System settings
    • Use the workspace
      • Overview
      • SQL window
      • Anonymous block window
      • Command-line window
      • Stored scripts
      • Snippet
    • Use tools
      • Data export and import
        • Overview
        • Export and import formats
        • Batch export and import
        • Single table export and import
      • Data mocking
      • Partitioning plan
      • Database changes
      • Shadow table synchronization
      • SQL plan
    • Recycle bin
    • View operation records
    • Task management
      • Overview
      • Import tasks
      • Export tasks
      • Data mocking tasks
      • Database change tasks
      • Partitioning plan task
      • Permission application tasks
      • Shadow table synchronization tasks
      • SQL plan task
    • Session management
    • Database objects
      • Table objects
        • Create a table
        • Create a table
        • Table list
        • Manage table attributes
        • Manage table data
      • View objects
        • Overview
        • Create a view
        • Manage views
      • Function objects
        • Overview
        • Create a function
        • Manage functions
      • Stored procedure objects
        • Overview
        • Create a stored procedure
        • Manage stored procedures
      • Sequence objects
        • Overview
        • Create a sequence
        • Manage sequences
      • Package objects
        • Overview
        • Create a program package
        • Manage program packages
      • Trigger objects
        • Overview
        • Create a trigger
        • Manage triggers
      • Type objects
        • Overview
        • Create a type
        • Manage types
      • Synonym objects
        • Overview
        • Create a synonym
        • Manage synonyms
    • Help center
  • User Guide (Client ODC)
    • Install ODC
    • ODC homepage
    • Connect to a database
      • Create a private connection
      • Manage connections
    • Use the workspace
      • Overview
      • SQL window
      • Anonymous block window
      • Command-line window
      • Stored scripts
      • Snippet
    • Use tools
      • Data export and import
        • Overview
        • Export and import formats
        • Batch export and import
        • Single table export and import
      • Data mocking
      • Asynchronous execution
      • Shadow table synchronization
    • Recycle bin
    • View operation records
    • Task management
      • Overview
      • Import tasks
      • Export tasks
      • Data mocking tasks
      • Database Change
      • Shadow table synchronization tasks
    • Session management
    • Database objects
      • Table objects
        • Overview
        • Create a table
        • Table list
        • Manage table attributes
        • Manage table data
      • View objects
        • Overview
        • Create a view
        • Manage views
      • Function objects
        • Overview
        • Create a function
        • Manage functions
      • Stored procedure objects
        • Overview
        • Create a stored procedure
        • Manage stored procedures
      • Sequence objects
        • Overview
        • Create a sequence
        • Manage sequences
      • Package objects
        • Overview
        • Create a program package
        • Manage program packages
      • Trigger objects
        • Overview
        • Create a trigger
        • Manage triggers
      • Type objects
        • Overview
        • Create a type
        • Manage types
      • Synonym objects
        • Overview
        • Create a synonym
        • Manage synonyms
    • Help center
  • Deployment Guide
    • Deployment overview
    • Preparations before deployment
    • Deploy a single ODC node
      • Deployment process
      • Load and run an ODC image
    • Deploy ODC in high availability mode
      • Deployment process
      • Load and run an ODC image
      • Deploy SSL certificate
      • Deploy the NGINX proxy
      • Configure certificate trust
    • Deployment verification
  • Upgrade Guide
    • Overview
    • Preparations before upgrade
    • Upgrade single-node ODC
      • Upgrade process
      • Stop ODC of the earlier version
      • Load and run an ODC image
    • Upgrade high-availability
      • Upgrade process
      • Stop ODC of the earlier version
      • Load and run an ODC image
      • Upgrade NGINX image
    • Upgrade verification
    • Rollback after upgrade failed
  • FAQ

Download PDF

Document Overview What's newWhat is ODC? Benefits Architecture Features Limits Overview Install ODC Log on to ODC with an account Create a private connection Tips on the SQL Console Create a connection Export data Import data Debug a stored procedure View the performance of an SQL statement Log on to ODC with an account Change the password ODC homepageCreate a private connection Manage private connections Overview Quick start Task process managementManage operation records Data desensitization managementSystem settings Overview SQL windowAnonymous block window Command-line window Stored scripts Snippet Data mocking Partitioning planDatabase changes Shadow table synchronization SQL planRecycle bin View operation records Overview Import tasks Export tasks Data mocking tasks Database change tasks Partitioning plan task Permission application tasks Shadow table synchronization tasks SQL plan taskSession management Help center Install ODC ODC homepage Create a private connection Manage connections Overview SQL windowAnonymous block window Command-line window Stored scripts Snippet Data mocking Asynchronous execution Shadow table synchronizationRecycle bin View operation records Overview Import tasks Export tasks Data mocking tasks Database Change Shadow table synchronization tasksSession management Help center Deployment overview Preparations before deployment Deployment process Load and run an ODC image Deployment process Load and run an ODC image Deploy SSL certificate Deploy the NGINX proxy Configure certificate trust Deployment verificationOverview Preparations before upgrade Upgrade process Stop ODC of the earlier version Load and run an ODC image Upgrade process Stop ODC of the earlier version Load and run an ODC image Upgrade NGINX image Upgrade verification Rollback after upgrade failed FAQ
OceanBase logo

The Unified Distributed Database for the AI Era.

Follow Us
Products
OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
Resources
DocsBlogLive DemosTraining & Certification
Company
About OceanBaseTrust CenterLegalPartnerContact Us
Follow Us

© OceanBase 2026. All rights reserved

Cloud Service AgreementPrivacy PolicySecurity
Contact Us
Document Feedback
  1. Documentation Center
  2. OceanBase Developer Center
  3. V4.1.0
iconOceanBase Developer Center
V 4.1.0Community Edition
  • V 4.4.2
  • V 4.4.1
  • V 4.4.0
  • V 4.3.4
  • V 4.3.3
  • V 4.3.2
  • V 4.3.1
  • V 4.3.0
  • V 4.2.4
  • V 4.2.3
  • V 4.2.2
  • V 4.2.1
  • V 4.2.0
  • V 4.1.3 and earlier
Community Edition
  • V 4.1.0
  • V 4.0.0
  • V 3.3.2
  • V 3.2.2
Enterprise Edition
  • V 4.1.3
  • V 3.4.0

Create a connection

Last Updated:2023-09-05 07:45:46  Updated
share
What is on this page
Background
Prerequisites
Procedure

folded

share

This topic describes how to create a database connection in OceanBase Developer Center (ODC).

Background

As an enterprise-level database development platform tailored for OceanBase Database, ODC can connect to your OceanBase Database, and allow you to edit and manage the database objects and resources. After you install client ODC or deploy web ODC, you must create database connections. ODC can connect to OceanBase Database in MySQL and Oracle modes on Apsara Stack and Alibaba Cloud.

Prerequisites

  • Client ODC has been installed or web ODC has been deployed. For the deployment of web ODC, contact your technical support personnel. For the installation of client ODC, see Install ODC.

  • If you are using web ODC, you have logged to ODC and entered the connection management page. For more information, see Log on to the database.

  • The connection information or connection string of the target instance has been obtained. The connection string of the example connection in this topic is as follows:

    -h100.0.0.0 -P8080 -uodc@oracle_tenant#odc_cluster -Dodc -p'Password01'
    

Procedure

  1. On the Connections tab of the ODC homepage, click Create Connection go to the Create Connection panel.

  2. Specify Region for the connection. The region is where the connected instance is located. The following options are available:

    • Public Cloud : the database instance deployed on Alibaba Cloud.

    • Independent Deployment/Apsara Stack : the database instance in your own environment. In this example, select Apsara Stack.

  3. Specify Connection Mode .

    OceanBase Database supports instances in MySQL and Oracle modes. In this example, Oracle is selected because the sample instance in this topic is in Oracle mode.

  4. Specify Connection Name .

    The connection name uniquely identifies the connection. You need to specify a unique connection name. The sample connection is named Connection_Tutorial.

  5. Use intelligent DNS resolution.

    If you have the connection string of the connected instance, you can paste the connection string to the Intelligent DNS Resolution field. After you click Intelligent DNS Resolution , ODC automatically resolves the string and specifies the parameters such as Endpoint , Default Database , Database Username , and Database Password . If you do not have the connection string, you can skip this step and start from Step 6 to manually enter the preceding information.

  6. Specify Endpoint .

    The endpoint contains the following information:

    • Host Name : the IP address of the server where the target instance is located. If your instance is located on Alibaba Cloud, you can get the host name from the tenant information page of the Alibaba Cloud Management Console. The IP address of the sample instance is 100.0.0.0.

    • Port : the port number of the server where the target instance is located. If your instance is on Alibaba Cloud, you can get the port number from the tenant information page of the Alibaba Cloud Management Console. The port number of the sample instance is 8080.

    • Cluster : the name of the cluster where the target instance is located. In this example, the cluster name is odc_cluster.

    • Tenant : the name of the tenant to which the target instance belongs. The tenant name of the sample instance is oracle_tenant.

  7. Specify Default Database .

    When you connect ODC to a database in a MySQL tenant, you can choose to specify a default database for the connection. This parameter does not need to be specified when you connect ODC to a database in an Oracle tenant. This parameter is optional. If you do not set this parameter, the default database instance information_schema is used.

  8. Specify Database Username .

    The database username is the name of a user created in a tenant. In Oracle mode, the username is the same as the schema name. In MySQL mode, the corresponding user of the username must access to the default database. The database username of the sample instance is odc.

  9. Specify Database Password .

    Specify the password corresponding to the database username specified in Step 8. The database password of the sample instance is Password01.

  10. Click Test Connection .

    After you specify Database Password , you can click Test Connection to check whether ODC is connected to the target instance based on the preceding connection information. The connection status does not affect the saving of the connection information.

  11. Specify whether to disable 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.

  12. Specify SQL Query Timeout Value in Advanced Configuration .

    ODC allows you to specify a custom SQL query timeout value, which is 60s by default. When the execution time of a query reaches the specified value, the query automatically terminates. In ODC V2.3.2 and later, transactions need to be manually committed. In earlier versions, transactions are automatically committed. In manual commit mode, the value of the ob_trx_idle_timeout variable cannot be less than the SQL query timeout value. If two SQL queries in one transaction are executed at an interval exceeding the value of ob_trx_idle_timeout, the connection will be terminated. However, if ob_trx_idle_timeout is set to an excessively large value, the session cannot be released in time, resulting in unnecessary memory consumption. Therefore, you need to set this parameter to a proper value.

  13. Specify Query SYS Tenant View in Advanced Configuration .

    You can specify the account that have the permission to query views of the sys tenant and the corresponding password. 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, that is, the root account under the sys tenant, by using this option. By default, the password for the root@sys account of the sample instance is null, so you only need to set Account to root. After you specify Account, you can click Test Connection to test whether you can use the root@sys account to access the current database.

  14. Click Save to save the connection information.

    After you configure all the preceding connection information, click Save in the lower-right corner to save the settings in the current Create Connection page. Then, the information appears on the Connections tab of the ODC homepage. You can directly find the target connection on the Connections tab and click the name of the connection to enter the connected instance in the future.

Previous topic

Tips on the SQL Console
Last

Next topic

Export data
Next
What is on this page
Background
Prerequisites
Procedure