Does DM support full + real-time incremental migration from MySQL to MySQL?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: DM支持MYSQL到MYSQL全量+实时增量迁移嘛?

| username: 孤君888

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version]
[Reproduction Path] What operations were performed that led to the issue
[Encountered Issue: Issue Phenomenon and Impact]
As mentioned, does DB support full + real-time incremental migration from MySQL to MySQL?
My source is a self-built MySQL 5.6 on Alibaba Cloud ECS with a data volume of less than 1TB, and the target is a physical machine MySQL 5.6 in the company’s data center. In this scenario, can DM handle it?
[Resource Configuration]
[Attachments: Screenshots / Logs / Monitoring]

| username: tidb菜鸟一只 | Original post link

DM is generally used to synchronize MySQL to TiDB, while TiCDC synchronizes TiDB to MySQL, Kafka, or S3. DM can also be used for MySQL to MySQL synchronization.

| username: 裤衩儿飞上天 | Original post link

Personally, I feel that full backup + master-slave replication from MySQL to MySQL is quite good.

| username: 孤君888 | Original post link

I have two MySQL 5.6 instances on Alibaba Cloud, and both of these databases need to be synchronized to an on-premises MySQL 5.6 instance. Unfortunately, MySQL 5.6 does not support multi-source replication…

| username: 孤君888 | Original post link

I saw a post before saying that DM synchronization from 5.7 to 5.7 is OK, but 5.6 doesn’t seem to work. So I’m here to ask.

| username: tidb菜鸟一只 | Original post link

Since the TiDB protocol is based on 5.7, there shouldn’t be any issues if your downstream is MySQL 5.7. As for 5.6, I haven’t tried it. You can test with a single table or database first.

| username: 孤君888 | Original post link

Yes, I just think it would be great if DM could be compatible with the MySQL 5.x series.

| username: maokl | Original post link

Use TiCDC for incremental synchronization.

| username: xingzhenxiang | Original post link

Theoretically, it seems possible, but why not use master-slave replication to complete this process?

| username: Jellybean | Original post link

ticdc’s upstream requirement is TiDB, and the downstream can be databases like MySQL, Kafka, or S3. It does not support MySQL to MySQL.

For MySQL to MySQL, you can use master-slave replication.

| username: Jellybean | Original post link

Another way is to first upgrade MySQL directly to 5.7 (or migrate from 5.6 to 5.7 on Alibaba Cloud), and then synchronize back to the local 5.7.

| username: 孤君888 | Original post link

Because it is MySQL 5.6, it does not support multi-source replication.

| username: 孤君888 | Original post link

This won’t work. The business side requires it to be consistent with the cloud MySQL version.

| username: 裤衩儿飞上天 | Original post link

You can first synchronize the two databases from Alibaba Cloud into one database, and then synchronize it offline, although it will cost some storage :smiling_imp:

| username: forever | Original post link

You can try the MySQL blackhole engine, which doesn’t take up storage space.

| username: 孤君888 | Original post link

I haven’t used Blackhole Engine :sweat_smile:

| username: forever | Original post link

You can try it. Use the black hole engine for transition in the middle, then synchronize to the target production database. Data initialization only needs to be done on the target production database.

| username: Hacker007 | Original post link

Just configure master-slave, it’s simple, convenient, and quick. If both sides have the same database name, you can filter the databases that need to be synchronized.

| username: liuis | Original post link

Just use MySQL directly.

| username: TiDB_C罗 | Original post link

Directly use Alibaba Cloud’s DTS service.