Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

Meet OceanBase AI Database, the unified database for operational data, real-time analytics, and AI. Explore ->

OceanBase logo

OceanBase

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

Product Overview
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

OceanBase

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

Product Overview
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
    • iconDatabase Key Features
    • 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 - V4.1.0

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogWhite PaperLive DemosTraining & CertificationTicket
    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. V4.1.0
    iconOceanBase Database
    SQL - V 4.1.0
    Databases
    • OceanBase Database
    • OceanBase Cloud
    • OceanBase Tugraph
    • Interactive Tutorials
    • OceanBase Best Practices
    • Database Key Features
    Tools
    • OceanBase Cloud Platform
    • OceanBase Migration Service
    • OceanBase Developer Center
    • OceanBase Migration Assessment
    • OceanBase Admin Tool
    • OceanBase Loader and Dumper
    • OceanBase Deployer
    • Kubernetes operator for OceanBase
    • OceanBase Diagnostic Tool
    • OceanBase Binlog Service
    Connectors and Middleware
    • OceanBase Database Proxy
    • Embedded SQL in C for OceanBase
    • OceanBase Call Interface
    • OceanBase Connector/C
    • OceanBase Connector/J
    • OceanBase Connector/ODBC
    • OceanBase Connector/NET
    SQL
    KV
    • V 4.6.0
    • 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

    Install and deploy oblogproxy by using the installation package

    Last Updated:2024-04-19 08:37:43  Updated
    Share
    What is on this page
    Background
    Install oblogproxy
    Configure the YUM repository of OceanBase Database
    Download and install the precompiled package
    Configure the sys tenant.
    Run oblogproxy
    Use oblogclient for data subscription
    More information

    folded

    Share

    You can deploy oblogproxy by downloading the installation package or using the source code. This topic describes how to deploy oblogproxy by downloading the installation package.

    Background

    oblogproxy is a proxy service for managing incremental logs of OceanBase Database. It is a part of OceanBase Migration Service (OMS). Designed based on obcdc, oblogproxy provides links for applications to access and manage real-time incremental logs of OceanBase Database.

    oblogproxy allows you to subscribe to incremental logs in isolated networks and supports multiple access methods. You can perform the following steps to configure and use oblogproxy.

    Install oblogproxy

    Notice

    • You do not need to specify information about OceanBase clusters when you configure oblogproxy. Technically, oblogproxy can subscribe to multiple OceanBase clusters when it is connected to all OBServer nodes by using the specified account and password of the sys tenant of each cluster. For security, the account and password are not exposed to oblogclient users.
    • oblogproxy is stateless. It obtains information about databases and tables for data subscription from oblogclient. The information such as the timestamps of incremental logs is also stored by oblogclient. When oblogproxy resumes the connection to an OBServer node after disconnection, it is equivalent to creating a new connection.
    • oblogproxy consumes a large amount of memory. We recommend that you deploy oblogproxy and the OBServer nodes on different servers to avoid affecting the database performance.

    Configure the YUM repository of OceanBase Database

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

    Download and install the precompiled package

    Go to the download page of open-source images and download the precompiled package named "oblogproxy-xxxx.OS version.x86_64.rpm". You must select the package based on the version of your operating system and run the following command to install the package:

    yum install -y oblogproxy-xxxx.OS version.x86_64.rpm
    

    Note

    By default, oblogproxy will be installed in the /usr/local/oblogproxy directory.

    Configure the sys tenant.

    For security, you must specify the username and password of a user for oblogproxy. Only a user in the sys tenant of OceanBase Database can be connected.

    Notice

    The username of this user cannot contain the cluster name or tenant name.

    After you obtain the account and password of the sys tenant of your OBServer node, you must encrypt them and configure them for oblogproxy. Run the following commands to obtain the encrypted strings of the account and password:

    # Assume that the account and password are user and pswd.
    ./logproxy -x user
    # After you run the command, you will get the following string: 4B9C75F64934174F4E77EE0E9A58****
    ./logproxy -x pswd
    # After you run the command, you will get the following string: DCE2AF09D006D6A440816880B938****
    

    Copy the encrypted account and password strings to the ob_sys_username and ob_sys_password fields of the conf.json file in the /usr/local/oblogproxy/conf/ directory. For example:

    {
      "ob_sys_username": "4B9C75F64934174F4E77EE0E9A58****",
      "ob_sys_password": "DCE2AF09D006D6A440816880B938****"
    }
    

    Run oblogproxy

    You can run the following commands to start the service.

    cd /usr/local/oblogproxy
    bash ./run.sh start
    

    By default, the 2983 port is listened to. You can set the service_port field in the conf.json file to change the port. The service logs of oblogproxy are stored in the logs/ directory. The service logs of the LogReader thread are stored in the run/{client-id}/logs/ directory.

    Note

    You can then use oblogclient for OceanBase data subscription. For more information, see Documentation.

    Use oblogclient for data subscription

    You can use oblogclient to subscribe to data from OceanBase Database. Make sure that you have installed Maven dependencies before use.

    <dependency>
      <groupId>com.oceanbase.logclient</groupId>
      <artifactId>logproxy-client</artifactId>
      <version>1.0.7</version>
    </dependency>
    

    After that, you can configure the oblogclient by referencing the following sample code:

    ObReaderConfig config = new ObReaderConfig();
    // Specify the IP addresses of OceanBase root servers and separate multiple IP addresses with semicolons (;) in the following format: ip1:rpc_port1:sql_port1;ip2:rpc_port2:sql_port2
    config.setRsList("xxx.xxx.xxx.1:2882:2881;xxx.xxx.xxx.2:2882:2881");
    // Specify the username and password (user tenant).
    config.setUsername("root");
    config.setPassword("root");
    // Specify the UNIX start timestamp in seconds. A value of 0 specifies to start the client from the current time. 
    config.setStartTimestamp(0L);
    // Specify the subscription allowlist in the tenant.db.table format. Use asterisks (*) as wildcards.
    config.setTableWhiteList("sys.*.*");
    
    // Specify the IP address of the server where oblogproxy is deployed to create the client instance.
    LogProxyClient client = new LogProxyClient("xxx.xxx.xxx.1", 2983, config);
    // Add the RecordListener
    client.addListener(new RecordListener() {
        @Override
        public void notify(LogMessage message){
            // Process the message.
        }
    
        @Override
        public void onException(LogProxyClientException e) {
            // Handle the error.
            if (e.needStop()) {
                // Stop the client when an unrecoverable exception occurs.
                client.stop();
            }
        }
    });
    
    // Start the client
    client.start();
    client.join();
    

    More information

    For more information about oblogclient, see oblogclient.

    Previous topic

    FAQ of obcdc
    Last

    Next topic

    Build oblogproxy by using the source code
    Next
    What is on this page
    Background
    Install oblogproxy
    Configure the YUM repository of OceanBase Database
    Download and install the precompiled package
    Configure the sys tenant.
    Run oblogproxy
    Use oblogclient for data subscription
    More information