Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.
Original topic: DM工具的target-database其host是否可以配置成SLB的地址
[TiDB Usage Environment] Production Environment
[TiDB Version] v6.1.2
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: Issue Phenomenon and Impact]
Can the host of the target-database in the DM tool be configured as the address of the SLB?
[Resource Configuration]
[Attachment: Screenshot/Log/Monitoring]
Are there any pitfalls when using SLB? (Just to be cautious)
I only have one downstream instance. How is your production configured?
There are multiple TiDB servers, do you understand?
I misread the configuration item…
Here we use HAProxy, just write the proxy directly.
T-Mac, feel free to use it. You can use SLB and domain names, and ultimately it will all fall onto one of the TiDB nodes.
Has it been production-verified? Dear Dawa-wakaka!
This is how everyone uses it. NBA fans don’t deceive NBA fans.
I did the test, and it is not possible.
There is absolutely no problem with the HAProxy address configuration on my end. You can try connecting to that address manually. It might be an issue with the security group not being open or some other problem.
Can you connect manually?
Whether or not to use the SLB address is not important. The key point is that you need to ensure that the MySQL client can connect when using this address. In simple terms, whether it is the SLB or the TiDB instance address, both are used for external connections to the TiDB cluster. You just need to ensure that the machine where the DM cluster is located can use this host to connect to the TiDB cluster. It doesn’t matter whether this host is an SLB or a TiDB-server instance.
Can you connect using this IP with the MySQL client on the server?
As long as the MySQL client can connect using this address, it will work.
It can be connected using the MySQL client, but not with DM. I asked the teacher, and it seems to be a connection protocol issue. Can anyone explain this?
If the MySQL client can connect, there should be no issue with the connection protocol.
Did you execute the MySQL client connection to SLB on the DM machine? Try using MySQL to connect on the DM machine.