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

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase 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 ServiceOceanBase DataPilotOceanBase OAgent

Connectors and Middleware

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

Databases

OceanBase DatabaseOceanBase AI DatabaseOceanBase Cloud OceanSeekOceanBase 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 ServiceOceanBase DataPilotOceanBase OAgent
OceanBase DatabaseOceanBase Cloud ToolsConnectors and MiddlewareLifecycle Support Policy

OceanBase Migration Service

V4.4.0Enterprise Edition
  • OMS Documentation
  • OMS Introduction
    • Overview of OMS
    • Terms
    • OMS HA
    • Principles of Store
    • Principles of Full-Import and Incr-Sync
    • Data verification principles
    • Architecture
      • Overview
      • Hierarchical functional system
      • Basic components
    • OMS Oracle full migration design and impact
    • Limitations
  • Quick Start
    • Data migration process
    • Data synchronization process
  • Deploy OMS
    • Deployment types
    • System and network requirements
    • Memory and disk requirements
    • Environment preparations
    • Deploy OMS on a single node
    • Deploy OMS on multiple nodes in a single region
    • Deploy OMS on multiple nodes in multiple regions
    • Scale out
    • Scale down deployment
    • Check the deployment
    • Deploy a time-series database (Optional)
  • OMS console
    • Log in to the OMS console
    • Overview
    • User center
      • Configure user information
      • Change your login password
      • Log out
  • Data migration
    • Data Migration Overview
    • Migrate data from a MySQL database to the MySQL-compatible mode of OceanBase Database
    • Migrate data from an OceanBase database in MySQL-compatible mode to a MySQL database
    • Migrate data from an Oracle database to the MySQL compatible mode of OceanBase Database
    • Migrate data from an OceanBase database in Oracle compatible mode to an Oracle database
    • Migrate data from an Oracle database to OceanBase Database in Oracle compatible mode
    • Migrate data from a DB2 LUW database to an Oracle-compatible tenant of OceanBase Database
    • Migrate data from an Oracle-compatible tenant of OceanBase Database to a DB2 LUW database
    • Migrate data from a DB2 LUW database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a MySQL-compatible tenant of OceanBase Database to a DB2 LUW database
    • Migrate data between OceanBase databases of the same tenant type
    • Configure a bidirectional synchronization task
    • Migrate data from a TiDB database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a PostgreSQL database to the Oracle compatible mode of OceanBase Database
    • Migrate data from a PostgreSQL database to the MySQL compatible mode of OceanBase Database
    • Migrate data from a PolarDB-X 1.0 database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from a Milvus database to a MySQL-compatible tenant of OceanBase Database
    • Migrate data from an OBSharding database to a MySQL-compatible tenant of OceanBase Database
    • Migrate incremental data from an Oracle-compatible tenant of OceanBase Database to a MySQL database
    • Migrate data from a Doris database to the MySQL-compatible mode of OceanBase Database
    • Migrate data from a DM database to an OceanBase database in MySQL-compatible mode
    • Migrate data from DM Database to OceanBase Database in Oracle compatible mode
    • Migrate data from Elasticsearch to OceanBase Database in MySQL-compatible mode
    • Migrate data from a SQL Server database to OceanBase Database in MySQL-compatible mode
    • Migrate data from an SQL Server database to OceanBase Database in Oracle compatible mode
    • Manage data migration tasks
      • View details of a data migration task
      • Rename a data migration task
      • View and modify migration objects
      • Use tags to Manage data migration tasks
      • Perform batch operations on data migration tasks
      • Download and import settings of migration objects
      • View and modify migration parameters
      • Download a conflict log file
      • Start and pause a data migration task
      • End and delete a data migration task
    • Supported DDL operations and limits for synchronization
      • Synchronize DDL operations from a MySQL database to a MySQL-compatible tenant of OceanBase Database
        • Overview of DDL synchronization from MySQL to OceanBase Database's MySQL compatible mode
        • CREATE TABLE
          • Create a table
          • Create a column
          • Create indexes or constraints
          • Create partitions
        • Data type conversion
        • ALTER TABLE
          • Modify tables
          • Operations on columns
          • Operations on constraints and indexes
          • Partition operations
        • TRUNCATE TABLE
        • RENAME TABLE
        • DROP TABLE
        • CREATE INDEX
        • DROP INDEX
        • DDL incompatibilities between a MySQL database and a MySQL-compatible tenant of OceanBase Database
          • Overview
          • Incompatibilities of the CREATE TABLE statement
            • Incompatibilities of CREATE TABLE
            • Column types that are supported to create indexes or constraints
          • Incompatibilities of the ALTER TABLE statement
            • Incompatibilities of ALTER TABLE
            • Change the type of a constrained column
            • Change the type of an unconstrained column
            • Change the length of a constrained column
            • Change the length of an unconstrained column
            • Delete a constrained column
          • Incompatibilities of DROP INDEX operations
      • Synchronize DDL operations from the MySQL compatible mode of OceanBase Database to a MySQL database
      • DDL operations for synchronizing data from an Oracle database to an Oracle-compatible tenant of OceanBase Database
        • Overview of DDL synchronization from Oracle to OceanBase Database Oracle compatible mode
        • CREATE TABLE
          • Overview for CREATE TABLE
          • Create a relational table
            • Create a relational table
            • Define columns of a relational table
          • Virtual columns
          • Regular columns
          • Create partitions
            • Overview for creating partitions
            • Partitioning
            • Subpartitioning
            • Composite partitioning
            • Custom partitioning
            • Subpartition templates
          • Constraints
            • Overview
            • Inline constraints
            • Out-of-line constraints
        • CREATE INDEX
          • Overview
          • Regular table indexes
        • ALTER TABLE
          • Overview
          • Modify, drop, and add table attributes
          • Column attribute management
            • Modify, drop, and add column attributes
            • Rename a column
            • Add columns and column attributes
            • Modify column attributes
            • Drop columns
          • Modify, drop, and add constraints
          • Partition management
            • Modify, drop, and add partitions
            • Drop a partition
            • Drop a subpartition
            • Add partitions and subpartitions
            • Modify partitions
            • Drop partition data
        • DROP TABLE
        • RENAME OBJECT
        • TRUNCATE TABLE
        • DROP INDEX
        • DDL incompatibilities between an Oracle database and an Oracle-compatible tenant of OceanBase Database
          • Overview
          • Incompatibilities of CREATE TABLE
          • Incompatibilities in table modification operations
            • Incompatibilities of ALTER TABLE
            • Change the type of a constrained column
            • Change the type of an unconstrained column
            • Change the length of a constrained column
            • Change the length of an unconstrained column
      • Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to an Oracle database
      • Synchronize DDL operations from a DB2 LUW database to an Oracle-compatible tenant of OceanBase Database
      • Synchronize DDL operations from the Oracle compatible mode of OceanBase Database to a DB2 LUW database
      • Synchronize DDL operations from a DB2 LUW database to a MySQL-compatible tenant of OceanBase Database
      • Synchronize DDL operations from the MySQL compatible mode of OceanBase Database to a DB2 LUW database
      • Synchronize DDL operations between MySQL-compatible tenants of OceanBase Database
      • Synchronize DDL operations between Oracle-compatible tenants of OceanBase Database
      • Synchronize DDL operations from a PostgreSQL database to the MySQL compatible mode of OceanBase Database
      • Synchronize DDL operations from a PostgreSQL database to the Oracle compatible mode of OceanBase Database
      • Synchronize DDL operations from an OBSharding database to the Oracle compatible mode of OceanBase Database
      • Synchronize DDL operations from an SQL Server database to an OceanBase database
  • Data synchronization
    • Data synchronization overview
    • Synchronize data from OceanBase Database to a Kafka instance
    • Synchronize data from OceanBase Database to a RocketMQ instance
    • Synchronize data from OceanBase Database to a DataHub instance
    • Synchronize data from OceanBase Database to Swift
    • Synchronize data from an ODP logical table to a physical table in a MySQL-compatible tenant of OceanBase Database
    • Synchronize data from an ODP logical table to a DataHub instance
    • Synchronize data from an IDB logical table to a MySQL-compatible tenant of OceanBase Database
    • Synchronize data from an IDB logical table to a DataHub instance
    • Synchronize data from a MySQL database to a DataHub instance
    • Synchronize data from an Oracle database to a DataHub instance
    • Synchronize data from an OBSharding database to Kafka
    • Manage data synchronization tasks
      • View details of a data synchronization task
      • Change the name of a data synchronization task
      • View and modify synchronization objects
      • Use tags to Manage data synchronization tasks
      • Perform batch operations on data synchronization tasks
      • Download and import the settings of synchronization objects
      • View and modify the parameter configurations of a data synchronization task
      • Start and pause a data synchronization task
      • End and delete a data synchronization task
  • Data validation
    • Data verification overview
    • Create a data validation task
    • Manage data validation tasks
      • View details of a data validation task
      • Change the name of a data validation task
      • View and modify validation objects
      • View and modify verification parameters
      • Manage data validation tasks by using tags
      • Import validation objects
      • Start, stop, and resume a data validation task
      • Clone a data validation task
      • Delete a data validation task
  • Create and manage data sources
    • Create data sources
      • Create an OceanBase data source
        • Create a physical OceanBase data source
        • Create an ODP data source
        • Create an IDB data source
        • Create a public cloud OceanBase data source
        • Create a standalone OceanBase data source
      • Create a MySQL data source
      • Create an Oracle data source
      • Create a TiDB data source
      • Create a Milvus data source
      • Create a Kafka data source
      • Create a RocketMQ data source
      • Create a DataHub data source
      • Create a Swift data source
      • Create a DB2 LUW data source
      • Create a PostgreSQL data source
      • Create an SQL Server data source
      • Create a PolarDB-X 1.0 data source
      • Create an OBSharding data source
      • Create a DM data source
      • Create a Doris data source
      • Create an Elasticsearch data source
    • Manage data sources
      • View data source information
      • Copy a data source
      • Edit a data source
      • Delete a data source
    • Create a database user
    • User privileges
    • Enable binlogs for the MySQL database
    • Minimum privileges required when an Oracle database serves as the source
  • OPS & Monitoring
    • O&M overview
    • Go to the overview page
    • Server
      • View server information
      • Add a server
      • Delete a server
      • Update the quota
      • View server logs
      • Manage resource groups
    • Components
      • Store
        • Add a Store component
        • View details of a Store component
        • Update the configurations of a Store component
        • Start and pause a Store component
        • Delete a Store component
      • Incr-Sync
        • View details of an Incr-Sync component
        • Start and pause an Incr-Sync component
        • Migrate an Incr-Sync component
        • Update the configurations of an Incr-Sync component
        • Batch O&M
        • Delete an Incr-Sync component
      • Full-Import
        • View details of a Full-Import component
        • Pause a Full-Import component
        • Rerun and resume a Full-Import component
        • Update the configurations of a Full-Import component
        • Delete a Full-Import component
      • Full-Verification
        • View details of a Full-Verification component
        • Pause a Full-Verification component
        • Rerun and resume a Full-Verification component
        • Update the configurations of a Full-Verification component
      • Incr-Verification
        • View details of the Incr-Verification component
        • Pause an Incr-Verification component
        • Rerun and resume an Incr-Verification component
        • Update an Incr-Verification component
      • Row-Verification
        • View details of a Row-Verification component
    • O&M Task
      • View O&M tasks
      • Skip a task or subtask
      • Retry a task or subtask
    • Parameter Template
      • Overview
      • Task Template
        • Create a task template
        • View and edit task templates
        • Copy and export a task template
        • Delete a task template
      • Component Template
        • Create a component template
        • View and edit component templates
        • Copy and export a component template
        • Delete a component template
      • Component parameters
        • Store component parameters
        • Incr-Sync component parameters
        • Full-Import component parameters
        • Full-Verification component parameters
        • Incr-Verification component parameters
        • Parameters of the Row-Verification component
        • CM component parameters
        • Supervisor component parameters
  • System management
    • Permission Management
      • Overview
      • Manage users
      • Manage departments
    • Alert center
      • View task alerts
      • View system alerts
      • Manage alert settings
    • Associate with OCP
    • System parameters
      • Modify system parameters
      • Modify HA configurations
      • oblogproxy parameters
    • Manage access keys
    • Operation audit
  • Troubleshooting Guide
    • Manage OMS services
    • OMS logs
    • Component O&M
      • O&M operations for the Supervisor component
      • CLI-based O&M for the Connector component
      • O&M operations for the Store component
    • Component tuning
      • Incr-Sync/Full-Import tuning
      • Oracle store tuning
    • Set throttling
    • Store performance diagnostics
  • Reference Guide
    • Features
      • Configure DDL/DML synchronization
      • DDL synchronization scope
      • Rename databases and tables
      • Use SQL conditions to filter data
      • Set the incremental synchronization start timestamp
      • Configure matching rules for migration or synchronization objects
      • Configure matching rules for validation objects
      • Wildcard patterns supported for matching rules
      • Hidden column mechanisms
      • Procedure for schema migration
      • Create and update a heartbeat table
      • Change a topic
      • Column filtering and column mapping
      • Data formats
      • Supported SQL Hints
    • API Reference
      • Overview
      • CreateProject
      • StartProject
      • StopProject
      • ResumeProject
      • ReleaseProject
      • DeleteProject
      • ListProjects
      • Query task details
      • DescribeProjectSteps
      • DescribeProjectStepMetric
      • DescribeProjectProgress
      • DescribeProjectComponents
      • ListProjectFullVerifyResult
      • StartProjectsByLabel
      • StopProjectsByLabel
      • CreateMysqlDataSource
      • CreateOceanBaseDataSource
      • CreateOceanBaseODPDataSource
      • CreatePolarDBDataSource
      • CreateMilvusDataSource
      • ListDataSource
      • CreateLabel
      • ListAllLabels
      • DeleteDataSource
      • CreateProjectModifyRecords
      • ListProjectModifyRecords
      • StopProjectModifyRecords
      • RetryProjectModifyRecords
      • CancelProjectModifyRecord
      • SubmitPreCheck
      • GetPreCheckResult
      • UpdateProjectConfig
      • Download schema conversion information
      • DownloadConflictData
      • ListConflictData
      • ResetIncrStartTimestamp
      • AdvanceProject
      • DescribeRegions
      • Create a user
      • Delete a user
      • Query user details
      • Query department list
      • Upload a Kafka authentication file
      • Create a Kafka data source
      • Create a DB2 LUW data source
    • Alert Reference
      • oms_host_down
      • oms_host_down_migrate_resource
      • oms_host_threshold
      • oms_migration_failed
      • oms_migration_delay
      • oms_sync_failed
      • oms_sync_status_inconsistent
      • oms_sync_delay
    • SSO
      • Integrate OMS with OIDC for SSO
      • Integrate the SAML 2.0 protocol to OMS to implement SSO
      • Access Microsoft Entra ID using OMS SAML 2.0
    • OMS error codes
    • SQL statements for querying database objects
    • Create a trigger
    • Change the log level for a PostgreSQL database instance
    • Online DDL tools
    • Supplemental logging in Oracle databases
    • Configure Milvus topics
  • Upgrade Guide
    • Overview
    • Upgrade OMS in single-node deployment mode
    • Upgrade OMS in multi-node deployment mode
    • FAQ
  • FAQ
    • General O&M
      • How do I modify the resource quotas of an OMS container?
      • How do I troubleshoot the OMS server down issue?
      • Deploy InfluxDB for OMS
      • Increase the disk space of the OMS host
    • Task diagnostics
      • How do I troubleshoot common problems with Oracle Store?
      • How do I perform performance tuning for Oracle Store?
      • What do I do when Oracle Store reports an error at the isUpdatePK stack?
      • What do I do when a store does not have data of the timestamp requested by the downstream?
      • What do I do when OceanBase Store failed to access an OceanBase cluster through RPC?
      • How do I use LogMiner to pull data from an Oracle database?
    • OPS & monitoring
      • What are the alert rules?
    • Data synchronization
      • FAQ about synchronization to a message queue
        • What are the strategies for ensuring the message order in incremental data synchronization to Kafka
    • Data migration
      • User privileges
        • What privileges do I need to grant to a user during data migration to or from an Oracle database?
      • Full migration
        • How do I query the ID of a checker?
        • How do I query log files of the Checker component of OMS?
        • How do I query the verification result files of the Checker component of OMS?
        • What do I do if the target table does not exist?
        • What can I do when the full migration failed due to LOB fields?
        • What do I do if garbled characters cannot be written into OceanBase Database V3.1.2?
      • Incremental synchronization
        • How do I skip DDL statements?
        • How do I migrate or synchronize Oracle database objects whose names exceed 30 bytes?
        • How do I update whitelists and blacklists?
        • What are the application scope and limits of ETL?
    • Installation and deployment
      • How do I upgrade Store?
  • Release Note
    • Release Note
      • Version number rules
      • V4.4
        • OMS V4.4.0
      • V4.3
        • OMS V4.3.3
        • OMS V4.3.2
        • OMS V4.3.1
        • OMS V4.3.0
      • V4.2
        • OMS V4.2.5
        • OMS V4.2.4
        • OMS V4.2.3
        • OMS V4.2.2
        • OMS V4.2.1
        • OMS V4.2.0
      • V4.1
        • OMS V4.1.0
      • V4.0
        • OMS V4.0.2
        • OMS V4.0.1
      • V3.4
        • OMS V3.4.0
      • V3.3
        • OMS V3.3.1
        • OMS V3.3.0
      • V3.2
        • OMS V3.2.2
        • OMS V3.2.1
      • V3.1
        • OMS V3.1.0
      • V2.1
        • OMS V2.1.2
        • OMS V2.1.0

Download PDF

Document Feedback
  1. Documentation Center
  2. OceanBase Migration Service
  3. V4.4.0

Migrate data from an OceanBase database in MySQL-compatible mode to a MySQL database

Last Updated:2026-11-26 09:35:11

Background information
Prerequisites
Limitations
Considerations
Data type mappings
Procedure

This topic describes how to use OceanBase Migration Service (OMS) to migrate data from an OceanBase database in MySQL-compatible mode (including physical data sources, public cloud data sources, and standalone data sources) to a MySQL database.

Background information

You can create a data migration task in the OMS console to migrate data from OceanBase Database in MySQL-compatible mode to a MySQL database. You can seamlessly migrate the existing business data and incremental data from the source database to the MySQL database through schema migration, full migration, and incremental synchronization.

The MySQL database supports single-primary database, single-standby database, and primary-standby database modes. When migrating data from OceanBase Database in MySQL-compatible mode to a MySQL database, the operations supported by different types of data sources also vary.

Type
Supported operations
Primary database only Schema migration + Full data migration + Incremental synchronization + Reverse incremental migration
Standby database only A MySQL data source with a single standby database cannot be used as the destination for data migration.
Primary/Standby databases Primary database: Supports schema migration, full data migration, incremental synchronization, and reverse incremental migration.

Prerequisites

You have created a database user dedicated to the data migration task for both the source OceanBase Database in MySQL-compatible mode and the target MySQL database, and granted the relevant permissions. For details, see Create a database user.

Limitations

  • Limitations on the source database

    Do not perform DDL operations that modify database or table schemas during schema migration or full migration. Otherwise, the data migration task may be interrupted.

  • Currently, OMS supports MySQL database versions V5.5, V5.6, V5.7, and V8.0.

  • OMS does not support primary keys containing the FLOAT or DOUBLE type.

  • OMS does not support the FLOAT and BINARY types appearing together in a primary key or unique key.

  • OMS does not support index fields larger than 16,000 bytes (4,000 characters) in MySQL database V5.6.

  • OMS does not support triggers (Triggers) at the target. If triggers exist, data migration may fail.

  • Data source identifiers and user accounts must be globally unique within the OMS system.

  • In OceanBase Database in MySQL-compatible mode versions earlier than V4.0.0, the presence of temporary tables will cause full migration to fail.

  • OMS only supports migrating objects whose database, table, and column names are ASCII-compliant and do not contain special characters (including line breaks, spaces, and .|"'`()=;/&\).

  • OMS does not support using an OceanBase standby database as the source.

Considerations

  • For OceanBase Database V4.x, it is strongly recommended to enable archive logging. After enabling archive logging, if clogs are recycled, OMS can still achieve incremental synchronization by consuming archive logs. For details on enabling archive logging, see Archive logging documentation.

  • If the source character set is UTF-8, it is recommended to use a character set compatible with the source at the target (for example, UTF-8, UTF-16, etc.) to avoid issues such as garbled characters at the target due to character set incompatibility.

  • Clock desynchronization between nodes, or between the client terminal and the server, may cause inaccurate latency measurements (for incremental synchronization/reverse incremental synchronization).

    For example, if a clock is earlier than standard time, the latency may be negative. If a clock is later than standard time, there may be a delay.

  • In a data migration task from OceanBase Database in MySQL-compatible mode to a MySQL database, if the OceanBase Database in MySQL-compatible mode version is earlier than V3.2.x and the table is a multi-partitioned table with a global unique index, updating the value of the table's partitioning key may cause data loss during migration.

  • Different configurations of the explicit_defaults_for_timestamp variable at the source and target may lead to inconsistent validation data for the TIMESTAMP type.

  • If you modify a unique index on the target side without enabling DDL synchronization, you must restart the incremental synchronization component; otherwise, data inconsistency may occur.

  • Please verify whether the migration precision of OMS for column types such as DECIMAL, FLOAT, or DOUBLE meets your expectations. If the precision of the target field type is lower than that of the source field type, truncation may occur, leading to data inconsistency between the source and target.

  • The TIMESTAMP range supported by the MySQL-compatible mode of OceanBase Database is from 0000-00-00 00:00:00.000000 to 9999-12-31 23:59:59.999999, while MySQL Database supports a TIMESTAMP range from 1970-01-01 00:00:01.000000 to 2038-01-19 03:14:07.999999. When writing to the target within a TIMESTAMP range not supported by the target, OMS will insert the value normally according to the source, but after identifying this data, it will write it to the error.log or an exception table.

  • In database/table aggregation scenarios:

    • It is recommended that you use matching rules to map the relationship between the source and target.

    • It is recommended that you create the table structure on the target side manually. If you use OMS to create it, skip the failed objects in the schema migration step.

  • In a data migration task where the source is an OceanBase Database with DDL synchronization enabled, if a rename (RENAME) operation occurs on a source database table, it is recommended that you restart the task to avoid data loss during incremental synchronization.

  • If the table structures at the source and target are not identical, data inconsistency may occur. Known scenarios include:

    • When manually creating a table structure, if it exceeds OMS's support range, implicit conversion issues may arise, leading to inconsistent column types between the source and target.

    • If the data length at the target is shorter than at the source, data truncation may occur, causing data inconsistency between the source and target.

  • In a data migration task where the source is an OceanBase Database with DDL synchronization enabled, if a rename (RENAME) operation occurs on a source database table, it is recommended that you restart the task to avoid data loss during incremental synchronization.

  • If you configure only Incremental Synchronization when creating a data migration task, OMS requires that the source database's archive logs be retained for more than 48 hours.

    ​If you configure Full Migration + Incremental Synchronization when creating the task, OMS requires that the source database's archive logs be retained for at least 7 days. Otherwise, the data migration task may fail due to inability to obtain incremental logs, potentially leading to data inconsistency between the source and target.

  • If table objects differing only in case exist at the source or target, the data migration result may not meet expectations due to case-insensitivity at the source or target.

  • Data migration tasks support tables without non-null unique keys. However, task restarts or other exceptions may cause duplicate data. We recommend that you configure a non-null unique key for every table.

  • If performing incremental synchronization with OceanBase Database as the source, or reverse incremental synchronization with OceanBase Database as the target, and the database table objects contain UDT columns, the incremental synchronization task may fail due to unsupported UDT columns.

Data type mappings

MySQL-compatible mode of OceanBase Database
MySQL Database
INTEGER INTEGER
TINYINT TINYINT
SMALLINT SMALLINT
MEDIUMINT MEDIUMINT
BIGINT BIGINT
FLOAT FLOAT
DOUBLE DOUBLE
REAL REAL
DECIMAL DECIMAL
NUMERIC NUMERIC
BOOL TINYINT(1)
DATE DATE
DATETIME DATETIME
TIMESTAMP TIMESTAMP
TIME TIME
YEAR YEAR
CHAR CHAR
VARCHAR VARCHAR TEXT (> 65535 bytes)
BLOB BLOB
TEXT TEXT
BINARY BINARY
VARBINARY VARBINARY
BIT BIT
ENUM

Notice

This data type is supported in OceanBase Database in MySQL mode V2.0.0 and later.

ENUM
SET

Notice

This data type is supported in OceanBase Database MySQL mode V2.0.0 and later.

SET
STRING

Notice

This data type is supported in OceanBase Database MySQL mode V2.3.5.1 and later.

MEDIUMTEXT
GEOMETRY GEOMETRY
POINT POINT
LINESTRING LINESTRING
POLYGON POLYGON
MULTIPOINT MULTIPOINT
MULTILINESTRING MULTILINESTRING
MULTIPOLYGON MULTIPOLYGON
GEOMETRYCOLLECTION GEOMETRYCOLLECTION

Procedure

  1. Create a data migration task.

    1. Log in to the OMS console.

    2. In the left-side navigation pane, click Data Migration.

    3. On the Data Migration page, click Create Task in the upper-right corner.

  2. On the Create Task page, customize the name of the migration task.

    We recommend that you use a combination of Chinese characters, numbers, and letters. The name must not contain spaces and cannot exceed 64 characters in length.

    Notice

    The task name is a unique identifier within the OMS system. Please choose a suitable name.

  3. In the Select Source and Target step, configure the parameters.

    Parameter
    Description
    Source If you have created an OceanBase database data source in MySQL-compatible mode (including physical, public cloud, or standalone data sources), select one from the drop-down list. If not, click New Data Source in the list to create one in the dialog box on the right. For details, see Create a physical data source in OceanBase Database, Create a public cloud data source in OceanBase Database, or Create a standalone data source in OceanBase Database.
    Target If you have created a MySQL data source, select one from the drop-down list. If not, click New Data Source in the list to create one in the dialog box on the right. For details, see Create a MySQL data source.
    You can select a single-primary database or a primary-standby database type for the MySQL data source. A single-standby database type MySQL data source cannot be used as the target for data migration. This topic uses the primary-standby database type as an example.
    Tag (Optional) Click the text box and select a target tag from the drop-down list. You can also click Manage Tags to create, modify, or delete tags. For details, see Manage data migration tasks by using tags.
  4. Click Next. In the Select Migration Type step, set Synchronization Topology to One-way Synchronization.

    OMS supports One-way Synchronization and Bidirectional Synchronization. This topic describes one-way synchronization. For details about two-way synchronization, see Configure a two-way synchronization task.

  5. In the Migration Options section, select the migration type for the current data migration task.

    Migration Type includes Schema Migration, Full Migration, Incremental Synchronization, and Reverse Increment.

    Migration Type
    Description
    Schema Migration After a schema migration task starts, OMS migrates data object definitions (tables, indexes, constraints, comments, views, etc.) from the source database to the target database and automatically filters temporary tables.
    Full Migration After a full migration task starts, OMS migrates the existing data from tables in the source database to the corresponding tables in the target database. If you select Full Migration, we recommend that you collect statistics from the OceanBase database in MySQL-compatible mode before migrating data. For details, see Collect statistics manually.
    Incremental Synchronization After an incremental synchronization task starts, OMS synchronizes changed data (inserts, modifications, or deletions) from the source database to the corresponding tables in the target database.
    Incremental Synchronization includes DML synchronization and DDL synchronization, which you can configure as needed. For details, see Configure DDL/DML synchronization. The usage limitations for Incremental Synchronization are as follows:
    • If you are migrating data from OceanBase Database V1.x, Incremental Synchronization is not supported.
    • Standby databases of MySQL databases do not support Incremental Synchronization.
    • If you select DDL synchronization, there is a risk of data migration interruption when the source database performs a DDL operation that OMS does not support.
    • If the DDL operation is to add a column, we recommend that you set the column's attribute to Null, as this also carries the risk of data migration interruption.
    • During incremental migration, if a column without data is inserted, previous data will be filled with the current time, leading to temporal inconsistency.
    Reverse Increment After a reverse increment task starts, it can continuously flow back the changed data generated in the target database after a business switchover to the source database in real time.
    Typically, reverse increment reuses the configuration of incremental synchronization, but you can also customize it according to actual needs. The following situations do not support selecting Reverse Increment:
    • Multiple tables are involved in data aggregation.
    • There is a one-to-many mapping of schemas.
  6. (Optional) Click Next.

    If you select Schema Migration or Incremental Synchronization, but the corresponding parameters are not configured for the source OceanBase Database data source in MySQL-compatible mode, the Add Data Source Information dialog box appears to remind you to configure them. For parameter details, see Create an OceanBase physical data source, Create an OceanBase public cloud data source, or Create an OceanBase standalone data source.

    After completing the supplementary configuration, click Test connectivity. After the connection test succeeds, click Save.

  7. Click Next. In the Select Migration Objects step, select the objects to be migrated for the current data migration task.

    You can select migration objects through two options: Specify Objects and Match by Rule. This topic describes how to select migration objects by specifying objects. For details on configuring matching rules, see Configure matching rules.

    Note

    • If the database name or table name contains the $$ character, it will affect the creation of the data migration task.

    • If you have selected DDL Synchronization in the Select Migration Type step, it is recommended to select migration objects using matching rules to ensure that all newly added objects that meet the migration object rules are synchronized. If you select objects by specifying objects, newly added objects or renamed objects will not be synchronized.

    • OMS automatically filters out unsupported objects. For the SQL statement used to query objects, see Query database objects.

    1. In the Select Migration Objects step, select Specify Objects.

    2. In the Source Object(s) list, select the objects to be migrated. You can select tables or views from one or more databases as migration objects.

    3. Click > to add them to the Target Object list.

    OMS supports importing objects via text, and allows operations such as renaming target objects, setting row filters, selecting partitions and columns, and removing individual or all migration objects.

    Note

    When selecting migration objects using the Matching Rules method, the renaming capability is overridden by the matching rule syntax, and only filtering conditions can be set at the operation level. For details, see Configure matching rules.

    Operation
    Step
    Import objects
    1. In the Destination Objects list, click Import Objects in the upper-right corner.
    2. In the dialog box, click OK.
      Note: The import will overwrite previous operation selections. Proceed with caution.
    3. In the Import Migration Objects dialog box, import the objects to be migrated.
      You can rename databases and tables, set row filter conditions, and perform other operations by importing a CSV file. For more information, see Download and import migration object configurations.
    4. Click Validate.
    5. After passing the legality validation, click OK.
    Rename OMS supports renaming migration objects. For more information, see Rename a database or table.
    Settings OMS supports configuring row filtering, partition selection, and columns to migrate.
    1. In the right-side list of the selection area, hover your mouse over the target object.
    2. Click the displayed Settings.
    3. In the Settings dialog box, you can perform the following operations.
        In the text box of the Row Filters section, enter a standard SQL WHERE clause to configure row filtering. For more information, see Filter data with SQL conditions.
      • In the drop-down list of the Partition section, select the specified partition data you need to obtain during the full migration phase. After making the selection, click OK.
      • In the Select Columns section, select the columns to migrate. For more information, see Column filtering.
    Remove/Remove All OMS supports removing one or more temporarily selected objects to the destination during data mapping.
    • Remove a single migration object
      In the Destination Objects list, hover your mouse over the target object and click the displayed Remove to remove that migration object.
    • Remove all migration objects
      In the Destination Objects list, click Remove All in the upper-right corner. In the dialog box, click OK to remove all migration objects.
    Change Database OMS supports changing the target database for tables during data migration. Select the objects whose database needs to be changed in the selected area, click Change Database below, enter the target database name in the pop-up window, and click OK. After configuration, you can view the actual migration effect in the selected area.
  8. Click Next. In the Migration Options step, configure the parameters.

    • Schema migration

      The following parameters are displayed only if you have selected One-way Synchronization > Schema Migration in the Select Migration Type step.

      Parameter
      Description
      Automatically proceed to the next stage upon completion When you select schema migration along with any other migration type, you can configure whether to automatically proceed to the next stage after schema migration is completed. The default value is Yes. You can also view and modify this setting on the Schema Migration tab of the data migration task details page.
      Normal index migration method Refers to the migration method for non-unique key indexes associated with table objects after migration. Valid values are Do Not Migrate, Migrate with Schema, and Post-Full-Migration" (This option is displayed only when Full Migration is selected).
    • Full migration

      The following parameters are displayed only if you have selected One-way Synchronization > Full Migration in the Select Migration Type step.

      Parameter
      Description
      Full migration rate limit You can decide whether to enable the full migration rate limit based on your actual needs. If enabled, set the RPS (the maximum number of data rows that can be migrated to the target per second during the full migration phase) and BPS (the maximum amount of data that can be migrated to the target per second during the full migration phase).

      Note

      The RPS and BPS set here are only for throttling. The actual achievable performance during full migration is limited by factors such as the source, target, and instance specifications.

      Full migration resource configuration You can select the default read concurrency, write concurrency, and memory for Small, Medium, or Large. You can also customize the resource configuration for full migration. Configuring resources for the Full-Import component limits the resource consumption during the task's full migration phase.

      Notice

      For custom configurations, the minimum value is 1, and only integers are supported.

      Processing strategy when target table has records The processing strategies include Ignore and Stop Migration:
      • If you select Ignore, when the target table contains data and the original data conflicts with the data to be written, OMS logs the conflicting data and retains the original data unchanged.
      • If you select Stop Migration, when the target table contains data, an error is reported during full migration, indicating that migration is not allowed. In this case, you must handle the data in the target table before continuing the migration.

        Notice

        If you click Resume after an error occurs, OMS will ignore this configuration option and continue migrating table data. Proceed with caution.

      • </ ul>
    • Incremental synchronization

      The following parameters are displayed only if you have selected One-way Synchronization > Incremental Synchronization in the Select Migration Type step.

      Parameter
      Description
      Incremental synchronization rate limit You can decide whether to enable the incremental synchronization rate limit based on your actual needs. If enabled, set the RPS (the maximum number of data rows that can be synchronized to the target per second during incremental synchronization) and BPS (the maximum amount of data that can be synchronized to the target per second during incremental synchronization).

      Note

      The RPS and BPS set here are only for throttling. The actual achievable performance during incremental synchronization is limited by factors such as the source, target, and instance specifications.

      Incremental log pull resource configuration You can select the default memory for Small, Medium, or Large. You can also customize the resource configuration for incremental log pull. Configuring resources for the Store component limits the resource consumption for log pulling during the incremental synchronization phase.

      Notice

      For custom configurations, the minimum value is 1, and only integers are supported.

      Incremental data write resource configuration You can select the default write concurrency and memory for Small, Medium, or Large. You can also customize the resource configuration for incremental data write. Configuring resources for the Incr-Sync component limits the resource consumption for data writing during the incremental synchronization phase.

      Notice

      For custom configurations, the minimum value is 1, and only integers are supported.

      Incremental record retention time The duration for which incremental parsed files are cached in OMS. A longer configured retention time requires more disk space for the Store component.
      Incremental synchronization start timestamp
      • If Full Migration was selected as the migration type, this parameter is not displayed.
      • If Full Migration was not selected but Incremental Synchronization was selected, specify a point in time after which data should be migrated. The default is the current system time. For details, see Set an incremental synchronization timestamp.
    • Reverse incremental

      The parameters in this section are displayed only if you have selected One-way Synchronization > Reverse Increment in the Select Migration Type step. The configuration parameters for reverse incremental are the same as those for incremental synchronization. You can select Reuse Incremental Synchronization Configuration in the upper-right corner.

      The reverse incremental procedure from OceanBase Database in MySQL-compatible mode to a MySQL database supports Adapt to Online DDL Tools. After enabling this feature, the database uses Online DDL tools to perform lock-free schema changes. Data migration will filter out temporary table objects, improving the stability of the data migration task. For details, see Introduction to Adapt to Online DDL Tools.

    • Advanced options

      • These parameters are displayed only if the source OceanBase Database in MySQL-compatible mode is V4.3.0 or later, and you have selected Reverse Increment > DDL synchronization in the Select Migration Type step.

        The storage types for source table objects include Default, Row Storage, Column Storage, and Hybrid Row-Column Storage. This configuration determines the storage type for source table objects during reverse incremental synchronization. For details, see default_table_store_format.

        Note

        The Default option adapts to other options based on the target parameter configuration. During reverse incremental migration, it writes the corresponding structures for newly added table objects in incremental DDL according to the set storage type.

      • The following parameters are displayed only if you did not select One-way Synchronization > Schema Migration or One-way Synchronization > Reverse Increment in the Select Migration Type step.

        Synchronize Data is disabled by default. After enabling it, you can write specified data (such as source schemas or values of other custom fields) to corresponding fields in the target.

        Parameter
        Description
        Synchronize Database Name If you choose to synchronize the database name, specify the field name and ensure all tables to be synchronized on the target have this field.
        Synchronize Custom Data After enabling this option, enter the Specify Field Name and Field Value. You can synchronize custom values as strings to specified fields in target tables.

    If the page's configuration parameters do not meet your needs, you can click Parameter Configuration at the bottom of the page for more specific settings. If you have configured task templates or component templates, you can also reference them here.

  9. Click Precheck to perform a precheck on the data migration task.

    During the Precheck step, OMS verifies whether the database user's read/write permissions, network connectivity, and other requirements are met. The data migration task can only start after all checks pass. If the precheck reports an error:

    • You can troubleshoot and resolve the issue, then re-execute the precheck until it succeeds.

    • You can also click Skip in the Actions column for the failed precheck item. A dialog box will pop up explaining the specific impact of skipping this operation. After confirming you can skip it, click OK in the dialog box.

  10. Click Start Task. If you do not need to start the task immediately, click Save to go to the data migration task details page, where you can start it manually as needed.

You can click Configure Validation Task in the upper-right corner of the data migration details page to compare data differences between the source and target databases. For more information, see Create a data verification task.

OMS supports modifying migration objects during the execution of a data migration task. For more information, see View and modify migration objects. After a data migration task starts, it is executed sequentially based on the selected migration type. For more information, see the "View migration details" section in View the details of a data migration task.

Previous topic

Migrate data from a MySQL database to the MySQL-compatible mode of OceanBase Database
Last

Next topic

Migrate data from an Oracle database to the MySQL compatible mode of OceanBase Database
Next
on this page
Background information
Prerequisites
Limitations
Considerations
Data type mappings
Procedure