88 lines
2.0 KiB
Markdown
88 lines
2.0 KiB
Markdown
Replica Reference Manual
|
|
========================
|
|
|
|
## CHANGE MASTER TO
|
|
CHANGE MASTER TO option [, option] ... [channel_option]
|
|
|
|
option : {
|
|
 MASTER_HOST='host_name'
|
|
 | MASTER_USER='user_name'
|
|
 | MASTER_PASSWORD='password'
|
|
 | MASTER_PORT=port_num
|
|
 | MASTER_HEARTBEAT_PERIOD=interval
|
|
 | MASTER_LOG_FILE='source_log_name'
|
|
 | MASTER_LOG_POS=source_log_pos
|
|
 | IGNORE_SERVER_IDS=(server_id_list)
|
|
 | SOURCE_HOST_TYPE='rds' / 'polardbx' / 'mysql'
|
|
}
|
|
|
|
channel_option:
|
|
 FOR CHANNEL channel
|
|
|
|
server_id_list:
|
|
 [server_id [, server_id]...]
|
|
|
|
options supported soon:
|
|
 MASTER_HEARTBEAT_PERIOD=interval (interval is now fixed to 120)
|
|
 WRITER_TYPE='transaction' / 'serial' / 'split' / 'merge'
|
|
<br/>
|
|
|
|
## CHANGE REPLICATION FILTER
|
|
|
|
CHANGE REPLICATION FILTER filter [, filter][, ...]
|
|
filter : {
|
|
 REPLICATE_DO_DB=(db_list)
|
|
 | REPLICATE_IGNORE_DB=(db_list)
|
|
 | REPLICATE_DO_TABLE=(tbl_list)
|
|
 | REPLICATE_IGNORE_TABLE=(tbl_list)
|
|
 | REPLICATE_WILD_DO_TABLE=(wild_tbl_list)
|
|
 | REPLICATE_WILD_IGNORE_TABLE=(wild_tbl_list)
|
|
 | REPLICATE_REWRITE_DB=(db_pair_list)
|
|
}
|
|
|
|
db_list :
|
|
 db_name[, db_name][, ... ]
|
|
|
|
tbl_list :
|
|
 db_name.table_name[, db_table_name][, ... ]
|
|
|
|
wild_tbl_list :
|
|
 'db_pattern.table_pattern'[, 'db_pattern.table_pattern'][, ...]
|
|
|
|
db_pair_list :
|
|
 (db_pair)[, (db_pair)][, ...]
|
|
|
|
db_pair:
|
|
 from_db, to_db
|
|
<br/>
|
|
|
|
## START SLAVE
|
|
|
|
START SLAVE [channel_option]
|
|
|
|
channel_option:
|
|
 FOR CHANNEL channel
|
|
<br/>
|
|
|
|
## STOP SLAVE
|
|
|
|
STOP SLAVE [channel_option]
|
|
|
|
channel_option:
|
|
 FOR CHANNEL channel
|
|
<br/>
|
|
|
|
## RESET SLAVE
|
|
RESET SLAVE [ALL] [channel_option]
|
|
|
|
channel_option:
|
|
 FOR CHANNEL channel
|
|
<br/>
|
|
|
|
## Commands supported soon:
|
|
SET SQL_SLAVE_SKIP_COUNTER=N
|
|
<br/>
|
|
|
|
## More details
|
|
For more details about commands and options, refer to MySQL [official Mysql document](https://dev.mysql.com/doc/refman/5.7/en/replication-statements-replica.html).
|