CREATE DB_DISCOVERY TYPE

Description

The CREATE DB_DISCOVERY TYPE syntax is used to create a database discovery type rule.

Syntax

  1. CreateDatabaseDiscoveryType ::=
  2. 'CREATE' 'DB_DISCOVERY' 'TYPE' databaseDiscoveryTypeDefinition ( ',' databaseDiscoveryTypeDefinition )*
  3. databaseDiscoveryTypeDefinition ::=
  4. discoveryTypeName '(' 'TYPE' '(' 'NAME' '=' typeName ( ',' 'PROPERTIES' '(' 'key' '=' 'value' ( ',' 'key' '=' 'value' )* ')' )? ')' ')'
  5. discoveryTypeName ::=
  6. identifier
  7. typeName ::=
  8. string

Supplement

  • discoveryType specifies the database discovery service type, ShardingSphere has built-in support for MySQL.MGR.

Example

Create discoveryType

  1. CREATE DB_DISCOVERY TYPE db_discovery_group_1_mgr(
  2. TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec'))
  3. );

Reserved word

CREATE, DB_DISCOVERY, TYPE, NAME, PROPERTIES