OceanBase
English日本語简体中文
Docs Home
Products
Integrations
Release Notes

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Databases

OceanBase DatabaseOceanBase Cloud OceanBase Best Practices

Connectors and Middleware

OceanBase Database Proxy OceanBase Connector/C OceanBase Connector/J OceanBase Connector/ODBC OceanBase Connector/NETOceanBase Command-Line Client

Tools

OceanBase Cloud PlatformOceanBase Migration ServiceOceanBase Developer CenterOceanBase Migration AssessmentOceanBase Admin ToolOceanBase Loader and DumperOceanBase DeployerKubernetes operator for OceanBaseOceanBase Diagnostic Tool OceanBase Binlog Service
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Database

  • Overview of the ecosystem
  • ORM frameworks
    • Java
      • Spring Boot
      • Spring Batch
      • Use Spring JDBC to connect to OceanBase Database
      • Spring Data JPA
      • Hibernate
      • MyBatis
      • jOOQ
    • Python
      • Use SQLAlchemy to connect to OceanBase Database
      • Connect to OceanBase Database by using peewee
      • Use Tortoise ORM to connect to OceanBase Database
    • Go
      • Connect to OceanBase Database by using GORM
      • beego ORM
    • Rust
      • SeaORM Connection to OceanBase Database
      • Diesel Connection to OceanBase Database
    • Ruby
      • Active Record
      • Sequel Connection to OceanBase Database
      • Connect to OceanBase Database by using Ruby on Rails
    • Node.js
      • Sequelize
      • TypeORM
      • Prisma
      • Drizzle
    • C#
      • Dapper
      • SqlSugar
      • FreeSQL
    • PHP
      • Connect to OceanBase Database by using the Yii 2.0 ORM
      • Connect to OceanBase Database by using Laravel Eloquent ORM
      • CakePHP
  • Database version management
    • Liquibase
    • Flyway
  • Data integration
    • Flink
      • Apache Flink
      • Flink DirectLoad
      • Flink Connector OceanBase
    • dbt
    • SeaTunnel
    • Maxwell
    • Debezium
    • Spark Catalog
    • NiFi
    • Qlik Replicate
    • RisingWave CDC
    • Flume
    • Migrate data from SQL Server to OceanBase Database by using MySQL Workbench
  • SQL development
    • WebLogic
    • DBeaver
    • Navicat
    • DataGrip
    • TablePlus
    • DMS
  • Orchestration and scheduling
    • Airflow
    • PowerJob
    • DolphinScheduler
    • Linkis
  • Visualization tools
    • Superset
    • Excel
    • Power BI
    • Quick BI
    • Tableau
    • GuanData
    • vividime
    • DataV
    • Metabase
    • Redash
    • FineReport
  • Database management
    • NineData
    • Bytebase
    • DataHub
    • Zabbix
  • AI
    • OpenAI
    • Qwen
    • LangChain
    • LlamaIndex
    • Dify
    • n8n
    • Trae
    • SpringAI
    • Cline
    • Cursor
    • Continue
    • MCP Toolbox
    • CamelAI
    • Firecrawl
    • Hugging Face
    • Ollama
    • Google Gemini
    • Cloudflare Workers AI
    • DB GPT
    • Jina AI
    • Augment Code
    • Claude Code
    • Kiro
    • GPT4All
  • Application
    • Ghost
    • Jira
    • Seata
    • SAP Crystal Reports
  • Middleware
    • Apache Pulsar

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Database
  3. master

Read data from OceanBase Database by using Maxwell

Last Updated:2026-09-04 07:40:45

Prerequisites
Procedure

Maxwell reads and converts MySQL binlogs into the JSON format. It is used to capture all data change events in a database. This topic describes how to use Maxwell to export data of a MySQL tenant of OceanBase Database in the JSON format.

Prerequisites

Before you use Maxwell, make sure that the following conditions are met:

  • You have installed oblogproxy.
  • You have installed Java 1.8 or later.
  • You have downloaded Maxwell. For more information, see the description of Maxwell at GitHub.

Procedure

  1. Configure Maxwell. Edit the config.properties file in the working directory of Maxwell. If this file does not exist, copy config.properties.example, rename it to config.properties, and edit the file.

    user=maxwell
    password=yourpassword
    host=IP address of the server of the source MySQL tenant of OceanBase Database
    producer=stdout
    

    stdout indicates the standard output mode. With this configuration, Maxwell directly exports data to the console. To enable Maxwell to export data to other targets such as Kafka, change the value of producer and adjust related configurations.

  2. Start Maxwell.

    Run the following command to start Maxwell:

    bin/maxwell --config config.properties
    
  3. View data changes. Change data in OceanBase Database, for example, insert, update, or delete data. Then, observe the JSON data exported by Maxwell. The output mode of Maxwell is set to stdout in the configuration file in Step 1. Therefore, a sample return result is as follows:

     {
     "database": "mydb",
     "table": "mytable",
     "type": "insert",
     "ts": 1589372847,
     "xid": 12345678,
     "commit": true,
     "data": {
         "id": 1,
         "column1": "value1",
         "column2": "value2"
     }
     }
    

    The return result shows that data was inserted into the mydb.mytable table.

Notice

OceanBase Database V4.1.0 and later support Latin character sets. If you use OceanBase Database of a version earlier than V4.1.0 as the MetaDB for Maxwell, you must manually build the metadata tables of Maxwell.

In the following example, the latin1 character set is deleted from the CREATE TABLE statement of Maxwell.

CREATE TABLE IF NOT EXISTS `databases` (
  id        bigint auto_increment NOT NULL primary key,
  schema_id bigint,
  name      varchar(255) charset 'utf8',
  charset   varchar(255),
  index (schema_id)
);

This example describes how to operate a single metadata table. You need to perform the same operations on other metadata tables.

Previous topic

SeaTunnel
Last

Next topic

Debezium
Next
on this page
Prerequisites
Procedure