-- https://dev.mysql.com/doc/refman/8.0/en/change-master-to.html

/* CHANGE MASTER TO option [, option] ... [ channel_option ]

option: {
    MASTER_BIND = 'interface_name'
  | MASTER_HOST = 'host_name'
  | MASTER_USER = 'user_name'
  | MASTER_PASSWORD = 'password'
  | MASTER_PORT = port_num
  | PRIVILEGE_CHECKS_USER = {'account' | NULL}
  | REQUIRE_ROW_FORMAT = {0|1}
  | REQUIRE_TABLE_PRIMARY_KEY_CHECK = {STREAM | ON | OFF}
  | ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS = {OFF | LOCAL | uuid}
  | MASTER_LOG_FILE = 'source_log_name'
  | MASTER_LOG_POS = source_log_pos
  | MASTER_AUTO_POSITION = {0|1}
  | RELAY_LOG_FILE = 'relay_log_name'
  | RELAY_LOG_POS = relay_log_pos
  | MASTER_HEARTBEAT_PERIOD = interval
  | MASTER_CONNECT_RETRY = interval
  | MASTER_RETRY_COUNT = count
  | SOURCE_CONNECTION_AUTO_FAILOVER = {0|1}
  | MASTER_DELAY = interval
  | MASTER_COMPRESSION_ALGORITHMS = 'algorithm[,algorithm][,algorithm]'
  | MASTER_ZSTD_COMPRESSION_LEVEL = level
  | MASTER_SSL = {0|1}
  | MASTER_SSL_CA = 'ca_file_name'
  | MASTER_SSL_CAPATH = 'ca_directory_name'
  | MASTER_SSL_CERT = 'cert_file_name'
  | MASTER_SSL_CRL = 'crl_file_name'
  | MASTER_SSL_CRLPATH = 'crl_directory_name'
  | MASTER_SSL_KEY = 'key_file_name'
  | MASTER_SSL_CIPHER = 'cipher_list'
  | MASTER_SSL_VERIFY_SERVER_CERT = {0|1}
  | MASTER_TLS_VERSION = 'protocol_list'
  | MASTER_TLS_CIPHERSUITES = 'ciphersuite_list'
  | MASTER_PUBLIC_KEY_PATH = 'key_file_name'
  | GET_MASTER_PUBLIC_KEY = {0|1}
  | NETWORK_NAMESPACE = 'namespace'
  | IGNORE_SERVER_IDS = (server_id_list),
  | GTID_ONLY = {0|1}
}

channel_option:
    FOR CHANNEL channel

server_id_list:
    [server_id [, server_id] ... ] */


CHANGE MASTER TO MASTER_BIND = 'interface_name', MASTER_HOST = 'host_name' FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_BIND = 'interface_name';
CHANGE MASTER TO MASTER_USER = 'user_name', MASTER_PASSWORD = 'password' FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_PORT = 3011;
CHANGE MASTER TO MASTER_CONNECT_RETRY = 10, MASTER_RETRY_COUNT = 5 FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_DELAY = 10, MASTER_HEARTBEAT_PERIOD = 5 FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_LOG_FILE = 'source_log_name', MASTER_LOG_POS = 4 FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_AUTO_POSITION = 0, MASTER_AUTO_POSITION = 1 FOR CHANNEL 'channel';
CHANGE MASTER TO RELAY_LOG_FILE = 'relay_log_name', RELAY_LOG_POS = 4025, MASTER_SSL = 0, MASTER_SSL = 1 FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_SSL_CA = 'ca_file_name', MASTER_SSL_CAPATH = 'ca_directory_name', MASTER_SSL_CERT = 'cert_file_name' FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_SSL_CRL = 'crl_file_name', MASTER_SSL_CRLPATH = 'crl_directory_name', MASTER_SSL_KEY = 'key_file_name' FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_SSL_CIPHER = 'cipher_list', MASTER_SSL_VERIFY_SERVER_CERT = 0, MASTER_SSL_VERIFY_SERVER_CERT = 1 FOR CHANNEL 'channel';
CHANGE MASTER TO MASTER_TLS_VERSION = 'protocol_list', IGNORE_SERVER_IDS = ('127.0.0.1', '127.0.0.1') FOR CHANNEL 'channel';

CHANGE MASTER TO PRIVILEGE_CHECKS_USER = 'account', PRIVILEGE_CHECKS_USER = NULL, REQUIRE_ROW_FORMAT = 0, REQUIRE_ROW_FORMAT = 1;
CHANGE MASTER TO REQUIRE_TABLE_PRIMARY_KEY_CHECK = STREAM, REQUIRE_TABLE_PRIMARY_KEY_CHECK = ON, REQUIRE_TABLE_PRIMARY_KEY_CHECK = OFF;
CHANGE MASTER TO ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS = OFF, ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS = LOCAL, ASSIGN_GTIDS_TO_ANONYMOUS_TRANSACTIONS = '839fa172-9f8d-4bf2-9a13-88dbc6e3814c';
CHANGE MASTER TO SOURCE_CONNECTION_AUTO_FAILOVER = 0, SOURCE_CONNECTION_AUTO_FAILOVER = 1;
CHANGE MASTER TO MASTER_COMPRESSION_ALGORITHMS = 'zlib,zstd', MASTER_COMPRESSION_ALGORITHMS = 'zlib';
CHANGE MASTER TO MASTER_ZSTD_COMPRESSION_LEVEL = 1, MASTER_TLS_CIPHERSUITES = 'ciphersuite_list', MASTER_PUBLIC_KEY_PATH = 'key_file_name';
CHANGE MASTER TO GET_MASTER_PUBLIC_KEY = 0, GET_MASTER_PUBLIC_KEY = 1;
CHANGE MASTER TO NETWORK_NAMESPACE = 'namespace', GTID_ONLY = 0, GTID_ONLY = 1;

CHANGE MASTER TO MASTER_HOST='host1', MASTER_PORT=3002 FOR CHANNEL 'channel2';
CHANGE MASTER TO MASTER_PASSWORD='new3cre';

CHANGE MASTER TO IGNORE_SERVER_IDS = ();

CHANGE MASTER TO
  MASTER_HOST='source2.example.com',
  MASTER_USER='replication',
  MASTER_PASSWORD='password',
  MASTER_PORT=3306,
  MASTER_LOG_FILE='source2-bin.001',
  MASTER_LOG_POS=4,
  MASTER_CONNECT_RETRY=10;

CHANGE MASTER TO RELAY_LOG_FILE='replica-relay-bin.006', RELAY_LOG_POS=4025;
