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 Database

SQL - V3.1.4Community Edition

  • Get Started
    • Overview
    • Quick Start
    • Hands on for OceanBase SQL
      • Before You Start
      • Basic Operations
    • Build Applications and Connect to OceanBase
      • Connect a Python application to OceanBase Database
      • Connect an ODBC application to OceanBase Database (using Unix ODBC)
      • Connect a Java application to OceanBase Database
      • Connect a Golang application to OceanBase Database (using Go-SQL-Driver/MySQL)
      • Connect a C application to OceanBase Database
    • Experience OceanBase Advanced Features
      • Experience Scalable OLTP
        • Run the TPC-C benchmark test in OceanBase Database
        • Experience the hot row update capability of OceanBase Database
      • Experience operational OLAP
      • Experience parallel import and data compression
      • Experience the multi-tenant feature
    • FAQ
    • Glossary

Download PDF

Overview Quick Start Before You Start Basic Operations Connect a Python application to OceanBase Database Connect an ODBC application to OceanBase Database (using Unix ODBC) Connect a Java application to OceanBase Database Connect a Golang application to OceanBase Database (using Go-SQL-Driver/MySQL) Connect a C application to OceanBase Database Experience operational OLAP Experience parallel import and data compression Experience the multi-tenant feature FAQ Glossary
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 Database
  3. SQL
  4. V3.1.4
iconOceanBase Database
SQL - V 3.1.4Community Edition
SQL
KV
  • V 4.4.2
  • V 4.3.5
  • V 4.3.3
  • V 4.3.1
  • V 4.3.0
  • V 4.2.5
  • V 4.2.2
  • V 4.2.1
  • V 4.2.0
  • V 4.1.0
  • V 4.0.0
  • V 3.1.4 and earlier
Community Edition
  • V 3.1.4

Quick Start

Last Updated:2023-07-21 09:10:58  Updated
share
What is on this page
Prerequisites
Use OBD to deploy OceanBase Database
Step 1: Download and install OBD
Step 2: Modify the configuration file
Step 3: Deploy and start an OceanBase cluster
Step 4: Connect to OceanBase Database
Use Docker to deploy OceanBase Database
Step 1: Start an OceanBase Database instance
Step 2: Connect to the OceanBase Database instance

folded

share

Quick Start

This topic describes how to quickly deploy and experience OceanBase Database.

Prerequisites

Your server is connected to the Internet, and your hardware and software meet the following requirements.

Item Description
OS · Anolis OS 8.X (Linux kernel V3.10.0 or later)
· Red Hat Enterprise Linux Server 7.X (Linux kernel V3.10.0 or later)
· CentOS Linux 7.X (Linux kernel V3.10.0 or later)
CPU At least 2 cores or preferably 8 cores or more
Memory At least 8 GB or preferably 32 GB or more

Note

At least 10 GB of memory is required if you use Docker to deploy OceanBase Database.
Disk type SSD (recommended)
Disk space Four times the memory size or more
File system EXT4 or XFS. Choose XFS when the data volume exceeds 16 TB.

Note
The following describes the deployment of OceanBase Database on an x86-based CentOS Linux 7.9 system. The procedure may be different on other OSs.

Use OBD to deploy OceanBase Database

Step 1: Download and install OBD

OceanBase Deployer (OBD) is the most efficient deployment tool to make OceanBase Database ready to work. We recommend that you use OBD when you deploy OceanBase Database for experience. Download and install OBD by performing the following steps.
If the server has access to the Internet and allows you to add a third-party YUM repository as the software source, you can run the following command to install OBD from the official software source of OceanBase:

sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
sudo yum install -y ob-deploy

Step 2: Modify the configuration file

This section describes how to use OBD to deploy OceanBase Database. Perform the following steps:
1. Download the sample configuration file for OceanBase Database.
2. Add the home_path field to the configuration file:

oceanbase-ce:
  global:
    #  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
    home_path: 

The home_path field specifies the working directory for OceanBase Database. OceanBase Database is started under this directory. You must create this directory in advance.

Step 3: Deploy and start an OceanBase cluster

Perform the following steps to deploy and start an OceanBase cluster:

  1. Run the following command the deploy the cluster:

    obd cluster autodeploy obtest -c quick_start_demo.yaml -A
    

    In this example, obtest is the cluster name. You can specify a different cluster name. However, you can specify only one unique name for a cluster. If you specify the -A parameter, a test tenant is automatically created by using remaining resources of the system.

  2. Run the following command to check the cluster status:

    obd cluster display obtest
    

Step 4: Connect to OceanBase Database

Perform the following steps to connect to OceanBase Database:

  1. Install the OceanBase Database client (OBClient):

    If you have added the official YUM repository of OceanBase as the software source, run the following command to install the OBClient:

    sudo yum install -y obclient
    
  2. Run the following command to connect to OceanBase Database by using the OBClient:

    obclient -h127.0.0.1 -P2881 -uroot@test
    

    By default, the OBClient connects to the OBServer by using port 2881. If you have changed the port, specify the port number that you use. tenant_name specifies the name of the tenant to connect to.
    Run the following command to check the tenant information:

    MySQL [(none)]> use oceanbase;
    Reading table information for completion of table and column names
    You can turn off this feature to get a quicker startup with -A
    
    Database changed
    MySQL [oceanbase]> select * from gv$tenant;
    

Use Docker to deploy OceanBase Database

Note
Before you deploy the oceanbase-ce image, make sure that the following prerequisites are met:

  • The resources on your server are sufficient to support a Docker container with at least 2 CPU cores and 8 GB of memory.
  • You have installed the latest version of Docker on your server. For more information, see the Docker Documentation.
  • You have started the Docker service on your server.

Step 1: Start an OceanBase Database instance

Run the following command to start an OceanBase Database instance:

# Deploy an instance with the maximum specifications supported by the container.
docker run -p 2881:2881 --name obstandalone -d oceanbase/oceanbase-ce

## Deploy a mini standalone instance.
docker run -p 2881:2881 --name obstandalone -e MINI_MODE=1 -d oceanbase/oceanbase-ce

Note
By default, the preceding command pulls the latest version of Docker image. You can select a desired docker image from Docker images as needed.
The process is expected to take two to five minutes. Run the following command. If boot success! is returned, the instance is started.

$ docker logs obstandalone | tail -1
boot success!

Step 2: Connect to the OceanBase Database instance

The oceanbase-ce image is integrated with the OBClient and the default connection script ob-mysql.

docker exec -it obstandalone ob-mysql sys # Connect to the root user of the SYS tenant.
docker exec -it obstandalone ob-mysql root # Connect to the root user of the test tenant.
docker exec -it obstandalone ob-mysql test # Connect to the test user of the test tenant.

You can also run the following command to connect to the instance by using the OBClient or MySQL client on your local server.

mysql -uroot -h127.1 -P2881

After the connection is established, the following information is displayed:

$ docker exec -it obstandalone ob-mysql sys

login as root@sys
Command is: obclient -h127.1 -uroot@sys -A -Doceanbase -P2881
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221487633
Server version: 5.7.25 OceanBase 3.1.4 (r10000092022071511-a09d3134c10665f03fd56d7f8bdd413b2b771977) (Built Jul 15 2022 11:16:22)

Copyright (c) 2000, 2022, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MySQL [oceanbase]>

Previous topic

Overview
Last

Next topic

Before You Start
Next
What is on this page
Prerequisites
Use OBD to deploy OceanBase Database
Step 1: Download and install OBD
Step 2: Modify the configuration file
Step 3: Deploy and start an OceanBase cluster
Step 4: Connect to OceanBase Database
Use Docker to deploy OceanBase Database
Step 1: Start an OceanBase Database instance
Step 2: Connect to the OceanBase Database instance