luozili

博客园 首页 新随笔 联系 订阅 管理

Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).

server_id相同,可以使用 show variables like '%server_id%'; 进行查询

 

 

解决办法:修改server_id 

SET GLOBAL server_id = 1;

Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction 'ANONYMOUS' at master log binlog.000002, end_log_pos 5212. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

master Position变更了

解决办法:修改MASTER_LOG_POS重启slave;

CHANGE MASTER TO
MASTER_HOST='source_host_name',
MASTER_USER='replication_user_name',
MASTER_PASSWORD='replication_password',
MASTER_LOG_FILE='recorded_log_file_name',
MASTER_LOG_POS=recorded_log_position;

posted on 2022-09-30 11:37  luozili  阅读(139)  评论(0编辑  收藏  举报