TIDB_SERVERS_INFO

TIDB_SERVERS_INFO 表提供了 TiDB 集群中 TiDB 服务器的信息(即 tidb-server 进程)。

  1. USE INFORMATION_SCHEMA;
  2. DESC TIDB_SERVERS_INFO;

输出结果如下:

  1. +---------------+--------------+------+------+---------+-------+
  2. | Field | Type | Null | Key | Default | Extra |
  3. +---------------+--------------+------+------+---------+-------+
  4. | DDL_ID | varchar(64) | YES | | NULL | |
  5. | IP | varchar(64) | YES | | NULL | |
  6. | PORT | bigint(21) | YES | | NULL | |
  7. | STATUS_PORT | bigint(21) | YES | | NULL | |
  8. | LEASE | varchar(64) | YES | | NULL | |
  9. | VERSION | varchar(64) | YES | | NULL | |
  10. | GIT_HASH | varchar(64) | YES | | NULL | |
  11. | BINLOG_STATUS | varchar(64) | YES | | NULL | |
  12. | LABELS | varchar(128) | YES | | NULL | |
  13. +---------------+--------------+------+------+---------+-------+
  14. 9 rows in set (0.00 sec)

查看 TIDB_SERVERS_INFO 表的信息:

  1. SELECT * FROM TIDB_SERVERS_INFO\G

输出结果如下:

  1. *************************** 1. row ***************************
  2. DDL_ID: 771c169d-0a3a-48ea-a93c-a4d6751d3674
  3. IP: 0.0.0.0
  4. PORT: 4000
  5. STATUS_PORT: 10080
  6. LEASE: 45s
  7. VERSION: 5.7.25-TiDB-v7.1.0
  8. GIT_HASH: 635a4362235e8a3c0043542e629532e3c7bb2756
  9. BINLOG_STATUS: Off
  10. LABELS:
  11. 1 row in set (0.006 sec)