Free audit

View Audit Scope
JusDBDM · TiDB Lightning · sync-diff-inspector · TiCDC rollback

TiDB migration from MySQL, with a way back.

JusDB moves MySQL, Amazon RDS, Aurora MySQL, and sharded MySQL to TiDB. Our engineers fix what TiDB cannot run, copy the data with TiDB Data Migration (DM) or TiDB Lightning, check it with sync-diff-inspector, and switch in a rehearsed window, with TiCDC replicating back to MySQL as a rollback path. 24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins.
The first 30-minute call covers your databases, current ownership, and required coverage. No production access is needed.
  • NDA before access
  • Read-only assessment first
  • Each production step approved by you

tidb_migration

Assessment

Gaps listed before data moves

Nothing moves to production until the data check and the rollback feed are in place.

P1 response SLA
15 mins
Critical, 24/7
P2 response SLA
30 mins
High, 24/7
P3 response SLA
60 mins
Medium, 24/7
Before cutover
Written plan
Steps, owners, checks, and stop points

Selected clients

  • Innoviti
  • Blitz
  • Freecharge
  • Nango
  • Recochain
  • Screen Facts
  • Nexora
  • WeCredit

Migration paths

How data moves to TiDB, by source and size.

The source, the data size, and whether the target already serves traffic decide the tools. We confirm the path during the assessment, not after the first load.

MySQL, smaller data sets

TiDB Data Migration (DM) in all mode: a full copy, then continuous replication from the binary log.
PingCAP's guide uses DM for sets under about 1 TiB. One tool covers both phases, so there is less to hand off at the switch.

MySQL, larger data sets

Dumpling exports the data, TiDB Lightning imports it, and DM then replicates changes from the binary log position of the export.
Lightning's physical import mode is the faster path, but it is not for a cluster that already serves production traffic, and its data is not covered by log backup.

Amazon Aurora MySQL

An Aurora snapshot exported to Amazon S3, imported with TiDB Lightning, then DM replication from the Aurora binary log.
We turn on binary logging in the cluster parameter group and set retention long enough to cover the import before the snapshot is taken.

Amazon RDS for MySQL

DM for smaller sets; Dumpling and TiDB Lightning, then DM, for larger ones.
We set binlog_format to ROW in the parameter group and raise binary log retention with mysql.rds_set_configuration, so DM can resume after a pause.

Sharded MySQL

DM shard merge, or TiDB Lightning to merge the full copy, then DM for the changes from every shard.
Auto-increment keys that repeat across shards are reworked first, since merged tables need a key that is unique across all of them.

CSV, SQL, or Parquet files

TiDB Lightning reads the files from local disk or object storage.
Useful when the source is not MySQL, or when the data arrives as an export from another system.

Paths from the PingCAP data migration overview, checked 27 November 2026. The 1 TiB figure is PingCAP's example, not a hard limit.

Compatibility checks

Six MySQL differences we fix before data moves.

TiDB speaks the MySQL protocol, but these gaps break migrations when they surface after the import. We list them in the assessment report.

Stored procedures, triggers, events

TiDB does not run stored procedures, triggers, events, or user-defined functions.
We list every one, and agree with your developers where its logic moves: into the application, a job scheduler, or TiCDC consumers.

AUTO_INCREMENT

Each TiDB server takes IDs in batches, so IDs stay unique but are not consecutive across servers. In-order inserts also land in the same Region, so one TiKV node takes the writes.
We check what code depends on ID order. Keys that only need to be unique move to AUTO_RANDOM; tables that need MySQL-style IDs get AUTO_ID_CACHE 1.

FOREIGN KEY

Foreign keys are enforced only from TiDB v6.6.0, and keys created on earlier versions stay inactive after an upgrade.
We confirm the target version and decide per relationship whether TiDB or the application enforces it.

Collations

TiDB defaults utf8mb4 to utf8mb4_bin, while MySQL 8.0 defaults to utf8mb4_0900_ai_ci. TiDB follows a client's utf8mb4_0900_ai_ci only from v7.4.0.
We pin collations in the converted schema, so comparisons, sorting, and unique keys behave the same after the move.

Large transactions

Very large single transactions, such as a DELETE over millions of rows, put memory pressure on TiDB and TiKV.
We rewrite batch jobs into smaller transactions, or use TiDB non-transactional DML for bulk deletes and updates.

Binary log settings

DM reads row-based binary logs. It does not support MySQL 8.0 binary log transaction compression, and it does not replicate views.
We check binlog_format, binlog_row_image, and compression on the source, run DM's precheck, and create views on TiDB by hand.

What a TiDB migration covers

Six workstreams from assessment to cutover.

Scope, dates, and the tables in scope are set in a written proposal before work starts. Results depend on the workload; we baseline before and measure after each approved change.

Assessment and sizing

A read-only review of the source: schema, features in use, data size, write rate, and the queries that matter most.

  • Incompatible features listed table by table
  • TiDB, TiKV, PD, and TiFlash node counts proposed for the target
information_schema · slow query log · DM precheck

Schema conversion

Primary keys, collations, and partitions reworked for TiDB before any data moves, so the import runs once.

  • AUTO_RANDOM, SHARD_ROW_ID_BITS, or PRE_SPLIT_REGIONS for busy tables
  • Indexes checked against the plans your top queries need
AUTO_RANDOM · SHARD_ROW_ID_BITS · EXPLAIN ANALYZE

Full copy

The first load with DM, or with Dumpling and TiDB Lightning for larger sets, into a cluster that is not yet serving traffic.

  • Import mode chosen per cluster: physical only for a cluster not yet serving traffic, logical otherwise
  • A full BR backup taken after a physical import, since log backup does not cover it
DM · Dumpling · TiDB Lightning · BR

Incremental replication

DM keeps TiDB in step with the source from the binary log until the cutover, with lag and errors on alerts.

  • DDL that TiDB rejects is caught and handled with dmctl, not skipped silently
  • Binary log retention on the source sized to survive a paused task
DM · dmctl · Grafana

Validation

Row data compared with sync-diff-inspector while replication runs, and the top queries replayed against TiDB.

  • Checksums by chunk, with fix SQL written for any difference
  • Query plans and latency compared with the source baseline
sync-diff-inspector · EXPLAIN ANALYZE · Top SQL

Cutover and rollback

A written cutover plan, rehearsed on a copy, and a TiCDC changefeed back to MySQL so the old database stays current.

  • Every step has an owner, a check, and a stop point
  • TiCDC replicates only tables with a primary key or a non-null unique index, so we check them first
TiCDC · DNS or proxy switch · runbooks

How the copy and the check run

A DM task and a sync-diff-inspector check.

Simplified versions of the files we write for each migration. Hosts, users, and table filters change per project; passwords are encrypted with dmctl and never stored in plain text.

01 · DM task: full copy, then binary log replication

# task.yaml
name: "orders-to-tidb"
task-mode: "all"          # full copy, then incremental replication

target-database:
  host: "tidb.internal"
  port: 4000
  user: "dm_writer"
  password: "<encrypted with dmctl encrypt>"

mysql-instances:
  - source-id: "mysql-primary"
    block-allow-list: "orders-only"

block-allow-list:
  orders-only:
    do-dbs: ["orders"]

# tiup dmctl --master-addr dm-master:8261 check-task task.yaml
# tiup dmctl --master-addr dm-master:8261 start-task task.yaml
# tiup dmctl --master-addr dm-master:8261 query-status orders-to-tidb

02 · Data check, then the rollback feed

# diff.toml for sync-diff-inspector
check-thread-count = 4
export-fix-sql = true

[data-sources.mysql1]
host = "mysql-replica.internal"
port = 3306
user = "diff_reader"

[data-sources.tidb0]
host = "tidb.internal"
port = 4000
user = "diff_reader"

[task]
output-dir = "./diff-output"
source-instances = ["mysql1"]
target-instance = "tidb0"
target-check-tables = ["orders.*"]

# At cutover: replicate TiDB back to the old MySQL
# tiup cdc cli changefeed create --server=http://ticdc:8300 \
#   --sink-uri="mysql://cdc_writer:****@mysql-old:3306/" \
#   --changefeed-id="rollback-to-mysql"

Cutover runbook

Six steps on the night, each with a stop point.

We rehearse the whole sequence on a copy first and record how long each step took. If a check fails, the runbook says who decides and how traffic returns to MySQL.

  1. Step 1

    Freeze writes on the source

    The application stops writing, or the source is set read-only, at the agreed time.

  2. Step 2

    Wait for DM to drain

    We confirm that DM has applied the last binary log position and that query-status shows no errors.

  3. Step 3

    Final data check

    sync-diff-inspector runs on the tables you mark as critical and must report no differences.

  4. Step 4

    Start the rollback feed

    We stop the DM task, then start a TiCDC changefeed from TiDB to the old MySQL before traffic moves, so the source stays current.

  5. Step 5

    Switch traffic

    Connection strings, DNS, or the proxy move to TiDB, and we watch errors, latency, and hot Regions.

  6. Step 6

    Decide, then retire

    After the agreed observation period, you decide to keep TiDB or roll back. The old MySQL is retired only after that decision.

SLA response times and ownership

Response times by severity, and who owns what.

Incidents on the clusters in scope get the SLA response times below, during the migration and after it if you keep JusDB on for operations.

24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins. Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support.

P1 · Critical

Production database down, primary unreachable, data corruption risk, or active failover event.

  • Response SLA: 15 mins
  • Coverage: 24/7

P2 · High

Severe latency spike, replication lag climbing rapidly, connection exhaustion, or degraded HA node.

  • Response SLA: 30 mins
  • Coverage: 24/7

P3 · Medium

Non-critical slow query regression, staging issue, backup warning, configuration question, or planned operational request.

  • Response SLA: 60 mins
  • Coverage: 24/7

Response means an on-call engineer is working the incident, not an automated reply. Support is 24/7.

Your team keeps
  • Set business priorities, application requirements, and release plans
  • Approve production changes, except routine actions you have pre-approved
  • Own your cloud accounts, access policies, and vendor relationships
  • Decide when maintenance can happen and how quickly service must recover
  • Move the work in-house or to another provider after your agreement's notice period, with your data returned or deleted and the transition help your agreement sets out (see Terms, section 8)
JusDB handles
  • Monitor database health, investigate alerts, and involve the right people
  • Review query performance, replication, capacity, and backup health
  • Carry out approved changes and update the operating instructions they affect
  • Report completed work, open risks, and recommended next steps

Ways to work with JusDB

Choose how our TiDB engineers back your team.

A scoped migration project, a design review before you commit, or ongoing operation after the move. A monthly retainer for a set number of engineering hours, or a monthly fee per database instance, HA cluster, or region; projects are scoped and quoted separately.

Project

TiDB migration

Assessment, schema conversion, full copy, replication, validation, and a rehearsed cutover with a rollback path.

Before you commit

TiDB consulting

Workload fit, MySQL compatibility, HTAP design, and TiDB Cloud or self-managed, in a written recommendation.

After the move

TiDB remote DBA

JusDB engineers run the new cluster day to day: monitoring, backups, upgrades, and incidents.

Procurement and security

Ready for legal and security review.

Mutual NDA before any access, least-privilege credentials in your vault, and security controls aligned with ISO 27001 and SOC 2 Type II.
  • Mutual NDA before any access
  • Named individual accounts only
  • Read-only access by default
  • ISO 27001 & SOC 2 Type II: aligned, certification in progress
  • Mutual NDA before any access

    We sign a mutual NDA before viewing schemas, logs, slow-query captures, or cloud topology.

  • Least-privilege, named credentials

    Engineers connect through your bastion, VPN, or SSM using named accounts with read-only permissions by default.

  • Change control & approval gates

    Production DDL, parameter changes, and failovers follow your change-management workflow with rollback steps prepared first.

  • Named leadership & direct escalation

    Engagements are led by named senior database reliability engineers in India with direct Slack, Teams, and PagerDuty channels.

TiDB migration FAQ

Questions about moving to TiDB.

Tools, compatibility gaps, data checks, and how a rollback works.

Still have a question?

Ask it on a scoping call. No production access needed.

Book a 30-min scoping call (opens Google Calendar in a new tab)

What does JusDB TiDB migration cover?

JusDB TiDB migration covers the move from MySQL, Amazon RDS, Aurora MySQL, or sharded MySQL to TiDB on your own servers, Kubernetes, or TiDB Cloud. Our engineers assess compatibility, convert the schema, run the full copy and incremental replication, check the data with sync-diff-inspector, and run a rehearsed cutover with a TiCDC rollback path. Your team approves each production step.

Which tool moves the data: DM, TiDB Lightning, or Dumpling?

JusDB picks the tool by source and size. PingCAP's guide uses TiDB Data Migration (DM) for MySQL sets under about 1 TiB, because DM does the full copy and the binary log replication. For larger sets, Dumpling exports the data, TiDB Lightning imports it, and DM replicates the changes after. Aurora snapshots and CSV or SQL files go through TiDB Lightning.

Can we roll back after moving to TiDB?

Yes, if the rollback path is built before the cutover. JusDB starts a TiCDC changefeed from TiDB to the old MySQL before traffic moves, so the old database keeps receiving every change. TiCDC replicates only tables with a primary key or a non-null unique index, so we check every table for one during the assessment.

TiDB high availability

What MySQL features need changes before moving to TiDB?

JusDB checks these before any data moves: stored procedures, triggers, events, and user-defined functions, which TiDB does not run; AUTO_INCREMENT columns that code expects to be consecutive; foreign keys, which TiDB enforces only from v6.6.0; collation defaults; and very large single transactions. Each gap gets a written fix that your developers agree.

How do you check the data matches before cutover?

JusDB runs sync-diff-inspector between the source and TiDB while replication is running. It compares tables in chunks by checksum and writes fix SQL for any rows that differ. Before the cutover, we run it again on the tables you mark as critical, after DM has drained, and replay your top queries to compare their execution plans and latency.

What SLA response times apply during a TiDB migration?

24/7 support. SLA response times: P1 – 15 mins | P2 – 30 mins | P3 – 60 mins. Our engineering team is in India (IST, UTC+5:30) and provides 24/7 support. Response means an on-call engineer is working the incident, not an automated reply.

Related TiDB services

Other ways JusDB works on TiDB.

Availability design, architecture reviews, day-to-day operation, and Kubernetes.

Availability

TiDB high availability

Raft replicas across zones, PD quorum, placement rules, and a TiCDC standby cluster.

Explore service
Architecture

TiDB consulting

Workload fit, MySQL compatibility, HTAP design, and TiDB Cloud decisions.

Explore service
Ongoing

TiDB remote DBA

Day-to-day operation of the cluster once the migration is done.

Explore service
Kubernetes

TiDB on Kubernetes

TiDB Operator, storage, and rolling upgrades for a Kubernetes target.

Explore service
Guide

TiDB explained

The three layers, transactions, scaling, and which MySQL features work.

Read the guide
All engines

Database migration services

How JusDB plans migrations across every engine it supports.

Explore service

Related TiDB Services

Explore more ways our TiDB experts can help with your database infrastructure.

Plan the move to TiDB

Move to TiDB with a rollback path ready.

A scoping call covers your source, data size, target platform, and dates. P1 response SLA: 15 mins, 24/7.