Migrating from MySQL to TiDB using DM tool; if the business has already written to TiDB and issues are found, how to switch back to MySQL. How to ensure that the data written to TiDB is synchronized to MySQL

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

Original topic: 使用DM工具从MySQL迁移到TiDB;如果业务已写TiDB,发现有问题,要切回MySQL。如何保障写入TIDB的数据,同步到MySQL

| username: TiDBer_HErMeXDz

Use the DM tool to migrate from MySQL to TiDB; if the business has already written to TiDB and issues are found, it needs to switch back to MySQL. How can we ensure that the data written to TiDB is synchronized back to MySQL?

| username: TIDB-Learner | Original post link

Generally, there is a parallel phase where you can use TiCDC to achieve TiDB→MySQL. If you encounter issues and need to switch back to MySQL, and it’s difficult to distinguish the data, let me introduce a company called DataX. Use replace.

| username: TiDBer_HErMeXDz | Original post link

During the parallel phase, can we perform dual writes for the business?

| username: DBAER | Original post link

After the data synchronization verification is completed, you can first perform dual-write synchronization for a period of time, primarily using MySQL. Once confirmed to be okay, then switch to primarily using TiDB.

| username: TiDBer_HErMeXDz | Original post link

Thank you, experts.

| username: xiaoqiao | Original post link

Dual-write for business, or CDC synchronization; switching TIDB/MySQL through VIP has the least impact.