mysql链接同步
server-id=10
log-bin=mysql-bin #日志名称
binlog-do-db=idianjiao_student #要同步的库
binlog-ignore-db=mysql #忽略的库
binlog-ignore-db=information_schema
binlog-ignore-db=performance_schema
binlog_format=mixed #日志格式
expire_logs_day=7 #日志过期时间
server-id=100
log-bin=mysql-bin
binlog-do-db=idianjiao_student
binlog-ignore-db=mysql
binlog_format=mixed
slave-skip-errors=all
#以下是链路库的新加配置
relay_log=relay_bin #日志名称
log_slave_updates=on #开启链接同步
#log_replica_updates #8.0以后的版本使用些配置
replicate-do-db=idianjiao_student #链接同步的库
replicate-ignore-db=mysql #链路忽略的库
expire_logs_day=7 #日志过期时间
server-id=1001
slave-skip-errors=all
slave-net-timeout=60
报错处理
- 检查server_id
- 检查server_uuid
show variables like '%server_id%';
show variables like '%server_uuid%';
select uuid(); #重新生成uuid
#修改 /data/auto.cnf