DB Discovery
#
Resource Operation
#
REGISTER STORAGE UNIT ds_0 (
HOST="127.0.0.1",
PORT=3306,
DB="ds_0",
USER="root",
PASSWORD="root"
),ds_1 (
HOST="127.0.0.1",
PORT=3306,
DB="ds_1",
USER="root",
PASSWORD="root"
),ds_2 (
HOST="127.0.0.1",
PORT=3306,
DB="ds_2",
USER="root",
PASSWORD="root"
);
Rule Operation
#
CREATE DB_DISCOVERY RULE db_discovery_group_0 (
STORAGE_UNITS(ds_0, ds_1),
TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec')),
HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?'))
);
ALTER DB_DISCOVERY RULE db_discovery_group_0 (
STORAGE_UNITS(ds_0, ds_1, ds_2),
TYPE(NAME='MySQL.MGR',PROPERTIES('group-name'='92504d5b-6dec')),
HEARTBEAT(PROPERTIES('keep-alive-cron'='0/5 * * * * ?'))
);
DROP DB_DISCOVERY RULE db_discovery_group_0;
DROP DB_DISCOVERY TYPE db_discovery_group_0_mgr;
- Drop db_discovery heartbeat
DROP DB_DISCOVERY HEARTBEAT db_discovery_group_0_heartbeat;
UNREGISTER STORAGE UNIT ds_0,ds_1,ds_2;
- Drop distributed database
DROP DATABASE discovery_db;