数据库发现

语法说明

  1. SHOW DB_DISCOVERY RULES [FROM schemaName]
  2. SHOW DB_DISCOVERY TYPES [FROM schemaName]
  3. SHOW DB_DISCOVERY HEARTBEATS [FROM schemaName]

返回值说明

DB Discovery Rule

说明
name规则名称
data_source_names数据源名称列表
primary_data_source_name主数据源名称
discovery_type数据库发现服务类型
discovery_heartbeat数据库发现服务心跳

DB Discovery Type

说明
name类型名称
type类型种类
props类型参数

DB Discovery Heartbeat

说明
name心跳名称
props心跳参数

示例

DB Discovery Rule

  1. mysql> show db_discovery rules;
  2. +------------+-------------------+--------------------------+------------------------------------------------------------------+------------------------------------------------------------------+
  3. | name | data_source_names | primary_data_source_name | discovery_type | discovery_heartbeat |
  4. +------------+-------------------+--------------------------+------------------------------------------------------------------+------------------------------------------------------------------+
  5. | ha_group_0 | ds_0,ds_1,ds_2 | ds_0 | {name=ha_group_0_mgr, type=mgr, props={group-name=92504d5b-6dec}} | {name=ha_group_0_heartbeat, props={keep-alive-cron=0/5 * * * * ?}} |
  6. +------------+-------------------+--------------------------+------------------------------------------------------------------+------------------------------------------------------------------+
  7. 1 row in set (0.20 sec)

DB Discovery Type

  1. mysql> show db_discovery types;
  2. +----------------+------+---------------------------+
  3. | name | type | props |
  4. +----------------+------+---------------------------+
  5. | ha_group_0_mgr | mgr | {group-name=92504d5b-6dec} |
  6. +----------------+------+---------------------------+
  7. 1 row in set (0.01 sec)

DB Discovery Heartbeat

  1. mysql> show db_discovery heartbeats;
  2. +----------------------+-------------------------------+
  3. | name | props |
  4. +----------------------+-------------------------------+
  5. | ha_group_0_heartbeat | {keep-alive-cron=0/5 * * * * ?} |
  6. +----------------------+-------------------------------+
  7. 1 row in set (0.01 sec)