Will changing the machine name affect TiDB?

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

Original topic: 修改机器名会影响tidb吗

| username: cf_data

Will changing the machine name affect the already deployed TiDB in a production environment?

| username: WalterWj | Original post link

Modifying the hostname will not affect the already deployed TiDB.

| username: wangccsy | Original post link

If you are connecting from another machine using an IP address, it won’t be affected. However, if you are using a hostname, you will need to use the new one.

| username: 小龙虾爱大龙虾 | Original post link

If you deploy using only IP, there will be no impact.

| username: zhanggame1 | Original post link

Generally speaking, TiDB is deployed using IP addresses, so it doesn’t have any impact.

| username: 连连看db | Original post link

It won’t have an impact. Nowadays, various components in virtual machines are mostly connected using IP addresses or domain names, and rarely associated with hostnames. However, there will be differences in k8s.

| username: 普罗米修斯 | Original post link

It doesn’t affect it. Basically, it is deployed using IP.

| username: dba远航 | Original post link

TD generally uses IP addresses instead of hostnames.

| username: andone | Original post link

There will be no impact.

| username: TIDB-Learner | Original post link

Will parsing be okay?

| username: YuchongXU | Original post link

It won’t.

| username: heiwandou | Original post link

Using IP deployment will not be affected.

| username: kelvin | Original post link

It basically doesn’t affect it, as they are all deployed using IPs.

| username: Hacker007 | Original post link

No, if you’re worried about issues like this, you can test it in the development environment first, and then execute it in the production environment once there are no problems.

| username: dba远航 | Original post link

It won’t.

| username: 随缘天空 | Original post link

No impact.

| username: 烂番薯0 | Original post link

It won’t.

| username: TiDBer_小阿飞 | Original post link

Check the parameter file in tiup cluster edit-config tidb-xxx to see if there is anything about HOSTNAME, usually it is set to IP.
Check the global configuration items:
global
monitored
server_configs
Check the local configuration items:
pd_servers
tidb_servers
tikv_servers
pump_servers
drainer_servers
cdc_servers
monitoring_servers
grafana_servers
alertmanager_servers

| username: 江湖故人 | Original post link

Some databases require configuring hostnames and even push DNS, which is really a huge pitfall.

| username: 哈喽沃德 | Original post link

Which database are you talking about?