The SHOW DB_DISCOVERY RULE
syntax is used to query specified database discovery rules for specified database.
ShowDatabaseDiscoveryRule::=
'SHOW' 'DB_DISCOVERY' ('RULE' ruleName | 'RULES') ('FROM' databaseName)?
ruleName ::=
identifier
databaseName ::=
identifier
databaseName
is not specified, the default is the currently used DATABASE
. If DATABASE
is not used, No database selected
will be prompted.Column | Description |
---|---|
group_name | Database discovery Rule name |
data_source_names | Data source name list |
primary_data_source_name | Primary data source name |
discovery_type | Database discovery service type |
discovery_heartbeat | Database discovery service heartbeat |
SHOW DB_DISCOVERY RULES FROM discovery_db;
mysql> SHOW DB_DISCOVERY RULES FROM discovery_db;
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
| group_name | data_source_names | primary_data_source_name | discovery_type | discovery_heartbeat |
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
| group_0 | ds_0,ds_1,ds_2 | ds_0 | {name=group_0_MySQL.MGR, type=MySQL.MGR, props={group-name=558edd3c-02ec-11ea-9bb3-080027e39bd2}} | {name=group_0_heartbeat, props={keep-alive-cron=0/5 * * * * ?}} |
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
1 row in set (0.01 sec)
SHOW DB_DISCOVERY RULES;
mysql> SHOW DB_DISCOVERY RULES;
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
| group_name | data_source_names | primary_data_source_name | discovery_type | discovery_heartbeat |
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
| group_0 | ds_0,ds_1,ds_2 | ds_0 | {name=group_0_MySQL.MGR, type=MySQL.MGR, props={group-name=558edd3c-02ec-11ea-9bb3-080027e39bd2}} | {name=group_0_heartbeat, props={keep-alive-cron=0/5 * * * * ?}} |
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
1 row in set (0.03 sec)
SHOW DB_DISCOVERY RULE group_0 FROM discovery_db;
mysql> SHOW DB_DISCOVERY RULE group_0 FROM discovery_db;
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
| group_name | data_source_names | primary_data_source_name | discovery_type | discovery_heartbeat |
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
| group_0 | ds_0,ds_1,ds_2 | ds_0 | {name=group_0_MySQL.MGR, type=MySQL.MGR, props={group-name=558edd3c-02ec-11ea-9bb3-080027e39bd2}} | {name=group_0_heartbeat, props={keep-alive-cron=0/5 * * * * ?}} |
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
1 row in set (0.01 sec)
SHOW DB_DISCOVERY RULE group_0;
mysql> SHOW DB_DISCOVERY RULE group_0;
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
| group_name | data_source_names | primary_data_source_name | discovery_type | discovery_heartbeat |
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
| group_0 | ds_0,ds_1,ds_2 | ds_0 | {name=group_0_MySQL.MGR, type=MySQL.MGR, props={group-name=558edd3c-02ec-11ea-9bb3-080027e39bd2}} | {name=group_0_heartbeat, props={keep-alive-cron=0/5 * * * * ?}} |
+------------+-------------------+--------------------------+---------------------------------------------------------------------------------------------------+-----------------------------------------------------------------+
1 row in set (0.03 sec)
SHOW
, DB_DISCOVERY
, RULE
, RULES
, FROM