Impact of Changing IP While Keeping Domain Name Unchanged for Upstream MySQL in Source File During DM Synchronization

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

Original topic: dm同步时,source文件中 上游mysql 的域名不变 ip变化 ,dm同步有何影响

| username: fly4310862

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 4.0.8
[DM Version] 2.0.7
[Reproduction Path] What operations were performed to cause the issue
[Encountered Issue: Problem Phenomenon and Impact]

The DM task is GTID-based. Currently, the address configured in the source file is the domain name N of MySQL replica A. However, when switching the domain name N to replica B, the DM synchronization task still connects to replica A.

How can I safely and effectively change the MySQL connection of the DM synchronization task to replica B?

[Resource Configuration]
[Attachments: Screenshots/Logs/Monitoring]

| username: xfworld | Original post link

If it’s a MySQL cluster, there used to be a router service to help determine which instance in the cluster is available,

For example:
DM ------> proxySQL -----> mysql cluster

The middleware will dynamically switch the downstream instances, but the address that DM connects to remains unchanged.


I understand that in your scenario, directly connecting to the binlog of the replica might work, right? This would be simpler.

| username: TI表弟 | Original post link

Theoretically, there should be no impact, but you need to check if there will be a retry when the TCP is interrupted. It might be necessary to resume.