当前位置:Gxlcms > 数据库问题 > mysql关于复制的一些信息参考

mysql关于复制的一些信息参考

时间:2021-07-01 10:21:17 帮助过:26人阅读

1.主库的复制用户密码修改后,在备库修改复制:
stop slave;
change master to master_user=‘username‘, master_password=‘password‘;
start slave;

2.创建复制子用户及其授权:
GRANT REPLICATION SLAVE, REPLICATION CLIENT ON . TO ‘repl‘@‘%‘;
alter user ‘repl‘@‘%‘ identified by "password";

3.关于复制的一些参数:
slave-parallel-type = LOGICAL_CLOCK
slave-parallel-workers = 20
master_info_repository = TABLE
relay_log_info_repository = TABLE
relay_log_recovery = ON
skip-slave-start = 0
relay-log = /data/mysql/data/relay-bin
slave-net-timeout = 60
sync-master-info = 0
sync-relay-log = 0
sync-relay-log-info = 0
read_only = 1
#rpl_semi_sync_master_enabled=1
#rpl_semi_sync_master_timeout=10000# 10 second
#rpl_semi_sync_slave_enabled=1

mysql关于复制的一些信息参考

标签:read_only   enabled   ant   enable   data   gic   grant   relay_log   ble   

人气教程排行