主从同步部署完成后,手动在从库删数据,再删主库的数据,导致从库不同步Coordinator stopped because there were error(s) in the worker(s).

在MySQL主从同步环境中,手动删除从库数据后,再删除主库对应数据,导致从库报错Slave_SQL_Running: No。通过检查performance_schema.replication_applier_status_by_worker表发现错误。解决方法包括停止从库,手动创建空库,重新启动,或者限制从库用户的权限为只读。
摘要由CSDN通过智能技术生成

背景:在虚拟机搭建主库和从库1,已经完成同步,先手动删了从1的一个库,又删了主的同一个库,此时从库会报错

Slave_IO_Running: Yes
Slave_SQL_Running: No

Last_Error: 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 mysql-bin.000013, end_log_pos 1154. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.

根据Last_Error提示,进入表performance_schema.replication_applier_status_by_worker查看

select * from performance_schema.replication_applier_status_by_worker;

发现具体问题如下:Error 'Can't drop database 'realy'; 

Worker 1 failed executing transaction 'ANONYMOUS' at master log mysql-bin.000013, end_log_pos 1154; Error 'Can't drop database 'realy'; datab
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值