START {SLAVE | REPLICA} [thread_types
] [until_option
] [connection_options
] [channel_option
]thread_types
: [thread_type
[,thread_type
] ... ]thread_type
: IO_THREAD | SQL_THREADuntil_option
: UNTIL { {SQL_BEFORE_GTIDS | SQL_AFTER_GTIDS} =gtid_set
| MASTER_LOG_FILE = 'log_name
', MASTER_LOG_POS =log_pos
| SOURCE_LOG_FILE = 'log_name
', SOURCE_LOG_POS =log_pos
| RELAY_LOG_FILE = 'log_name
', RELAY_LOG_POS =log_pos
| SQL_AFTER_MTS_GAPS }connection_options
: [USER='user_name
'] [PASSWORD='user_pass
'] [DEFAULT_AUTH='plugin_name
'] [PLUGIN_DIR='plugin_dir
']channel_option
: FOR CHANNELchannel
gtid_set
:uuid_set
[,uuid_set
] ... | ''uuid_set
:uuid
:interval
[:interval
]...uuid
:hhhhhhhh
-hhhh
-hhhh
-hhhh
-hhhhhhhhhhhh
h
: [0-9,A-F]interval
:n
[-n
] (n
>= 1)
Starts the replication threads. 启动复制线程。From MySQL 8.0.22, 在MySQL 8.0.22中,不推荐使用START SLAVE
is deprecated and the alias START REPLICA
should be used instead. START SLAVE
,而应使用别名START REPLICA
。The statement works in the same way as before, only the terminology used for the statement and its output has changed. 语句的工作方式与以前相同,只是用于语句及其输出的术语发生了更改。Both versions of the statement update the same status variables when used. 语句的两个版本在使用时更新相同的状态变量。Please see the documentation for 有关该语句的说明,请参阅START REPLICA
for a description of the statement.START REPLICA
的文档。