一,主从复制,从库报错,
因为主库上执行了一条针对从库上不存在数据库的sql
二,解决:
1,执行下面的sql即可,
stop replica;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1;
start replica;
需要注意以前的stop slave/start slave不可用了
2,也可以用下面的sql:
MASTER_HOST:主库ip,
MASTER_USER: 备份用户用户名,
MASTER_PASSWORD: 备份用户密码,
MASTER_LOG_FILE:跳过错误后的日志文件名,
MASTER_LOG_POS:跳过错误后的日志position
stop replica;
CHANGE MASTER TO MASTER_HOST='10.11.16.105',MASTER_USER='replica', MASTER_PASSWORD='replicapass',MASTER_LOG_FILE='mysql-bin.000036',MASTER_LOG_POS=107;
start replica;
标签:主从复制,LOG,mysql8,stop,start,replica,MASTER,从库 From: https://www.cnblogs.com/architectforest/p/18458061