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 Deployer

V3.1.0Community Edition
  • What is obd
  • Quick Start
    • Install obd
    • Quickly deploy OceanBase Database
    • Quickly deploy OCP
    • Deploy an OceanBase cluster on the GUI
  • obd Command
    • Quick deployment command
    • Cluster commands
    • Mirror and repository commands
    • Testing commands
    • Tool commands
    • obdiag commands
    • Binlog commands
    • Telemetry commands
  • User Guide
    • Configuration files
    • Deploy through GUI
      • GUI operation overview
      • Deploy OCP through the GUI
      • Modify components on the GUI
    • Deploy through CLI
      • Deploy OceanBase Database on a single server
      • Deploy OCP Express by using commands
      • Deploy and use obconfigserver
      • Deploy the binlog service
      • Deploy oblogproxy by using the CLI
      • Deploy OCP by using commands
      • Use OCP to take over a cluster deployed by obd
      • Use obd to take over a cluster
      • Add GUI-based monitoring for an existing cluster
      • Upgrade OCP Express
      • Upgrade OceanBase Database
      • Physical Standby Database
        • Deploy primary and standby tenants by using obd
        • Switch the roles of tenants and decouple a standby tenant from the primary tenant
      • Scale out a cluster and change cluster components
      • Performance test
      • Cluster diagnotistics
  • FAQ
    • FAQ
    • How do I upgrade an OBProxy to obproxy-ce 3.2.3?
  • Mode configuration rules
  • Error codes
  • Release Notes
    • Version rules
    • V3.1
      • OceanBase Deployer V3.1.2
      • OceanBase Deployer V3.1.1
      • OceanBase Deployer V3.1.0
    • V3.0
      • OceanBase Deployer V3.0.1
      • OceanBase Deployer V3.0.0
    • V2.10
      • OceanBase Deployer V2.10.1
      • OceanBase Deployer V2.10.0
    • V2.9
      • OceanBase Deployer V2.9.2
      • OceanBase Deployer V2.9.1
      • OceanBase Deployer V2.9.0
    • V2.8
      • OceanBase Deployer V2.8.0
    • V2.7
      • OceanBase Deployer V2.7.0
    • V2.6
      • OceanBase Deployer V2.6.2
      • OceanBase Deployer V2.6.1
      • OceanBase Deployer V2.6.0
    • V2.5
      • OceanBase Deployer V2.5.0
    • V2.4
      • OceanBase Deployer V2.4.0
    • V2.3
      • OceanBase Deployer V2.3.1
      • OceanBase Deployer V2.3.0
    • V2.2
      • OceanBase Deployer V2.2.0
    • V2.1
      • OceanBase Deployer V2.1.1
      • OceanBase Deployer V2.1.0
    • V2.0
      • OceanBase Deployer V2.0.1
      • OceanBase Deployer V2.0.0
    • V1.6
      • OceanBase Deployer V1.6.2
      • OceanBase Deployer V1.6.1
      • OceanBase Deployer V1.6.0
    • V1.5
      • OceanBase Deployer V1.5.0
    • V1.4
      • OceanBase Deployer V1.4.0
    • V1.3
      • OceanBase Deployer V1.3.3
      • OceanBase Deployer V1.3.2
      • OceanBase Deployer V1.3.0
    • V1.2
      • OceanBase Deployer V1.2.1
      • OceanBase Deployer V1.2.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Deployer
  3. V3.1.0

Binlog commands

Last Updated:2026-09-04 08:21:29

obd binlog create
obd binlog drop
obd binlog show
obd binlog start
obd binlog stop

The binlog service collects transaction logs of OceanBase Database and converts them into MySQL binlogs. This service is designed for scenarios such as real-time data subscription. For more information, see the OceanBase Binlog Service documentation.

You can specify the -h/--help option in a command to query its help information. You can also specify the -v/--verbose option to query the execution details of a command that returns an error.

Note

  • The business tenant in this topic is an OceanBase Database tenant for which binlog files are to be generated.

  • The cluster name and deployment name in this topic are names returned by the obd cluster list command. If the cluster where the business tenant resides is not managed by OceanBase Deployer (obd), you can take over the cluster to obd. For more information, see Use obd to take over a cluster.

obd binlog create

You can run this command to create a binlog instance for the specified tenant.

obd binlog create <binlog deploy name> <oceanbase deploy name> <oceanbase tenant> [options]

# example
obd binlog create binlog_1 obdemo ob_mysql --replicate-num=3

binlog deploy name specifies the deployment name of the binlog service. oceanbase deploy name specifies the name of the cluster where the business tenant resides. oceanbase tenant specifies the name of the business tenant.

The following table describes the options in the command.

Option
Required
Data type
Default value
Description
--replicate-num No int 1 The number of binlog instance replicas of the tenant. When the value is greater than 1, the binlog service randomly selects an instance replica as the leader instance.
-d/--odp/--obproxy-deployname No string ob_deployname The name of the deployed cluster where the OceanBase Database Proxy (ODP) associated with the business tenant resides. This parameter is required only when the ODP and the business cluster belong to different deployed clusters.
-p/--cdcro-password No string Empty The password of the cdcro user in the sys tenant. This parameter is required only if you have manually created a cdcro user.

Note

If no cdcro user exists in the sys tenant of the cluster where the business tenant resides, this command automatically creates a cdcro user in the sys tenant.

obd binlog drop

You can run this command to stop all binlog instances in the specified tenant and drop generated binlog files. It is equivalent to the DROP BINLOG FOR TENANT <cluster>.<tenant>; command in the binlog service.

obd binlog drop <binlog deploy name> <oceanbase deploy name> <oceanbase tenant> [options]

# example
obd binlog drop binlog_1 obdemo ob_mysql

binlog deploy name specifies the deployment name of the binlog service. oceanbase deploy name specifies the name of the cluster where the business tenant resides. oceanbase tenant specifies the name of the business tenant.

obd binlog show

You can run this command to list the binlog instances. It is equivalent to the SHOW BINLOG INSTANCES FOR <cluster>.<tenant>; command in the binlog service.

obd binlog show <deploy name> [options]

# example
obd binlog show binlog_1 -d obdemo -t ob_mysql

deploy name specifies the deployment name of the binlog service.

The following table describes the options in the command.

Option
Required
Data type
Default value
Description
-d/--deploy-name No string Empty The deployment name of the business cluster.
-t/-n/--tenant_name No string Empty The name of the business tenant.

Note

You can specify both or neither of the two options in this command. If you specify only one of them, an error will be returned.

obd binlog start

You can run this command to start all binlog instances in the specified tenant.

obd binlog start <binlog deploy name> <oceanbase deploy name> <oceanbase tenant> [options]

# example
obd binlog start binlog_1 obdemo ob_mysql

binlog deploy name specifies the deployment name of the binlog service. oceanbase deploy name specifies the name of the cluster where the business tenant resides. oceanbase tenant specifies the name of the business tenant.

obd binlog stop

You can run this command to stop all binlog instances in the specified tenant.

obd binlog stop <binlog deploy name> <oceanbase deploy name> <oceanbase tenant> [options]

# example
obd binlog stop binlog_1 obdemo ob_mysql

binlog deploy name specifies the deployment name of the binlog service. oceanbase deploy name specifies the name of the cluster where the business tenant resides. oceanbase tenant specifies the name of the business tenant.

Previous topic

obdiag commands
Last

Next topic

Telemetry commands
Next
on this page
obd binlog create
obd binlog drop
obd binlog show
obd binlog start
obd binlog stop