主从同步,从库报错代码:1141 ,错误信息如下:

                  Master_Port: 3306
Connect_Retry: 60
Master_Log_File: binlog.000086
Read_Master_Log_Pos: 596130762
Relay_Log_File: mysql-relay-bin.000486
Relay_Log_Pos: 212230586
Relay_Master_Log_File: binlog.000086
Slave_IO_Running: Yes
Slave_SQL_Running: No
Replicate_Do_DB:
Replicate_Ignore_DB: information_schema,performance_schema,undolog,for_nagios
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table: information_schema.%,performance_schema.%
Last_Errno: 1141
Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '510f1fe6-aeba-4334-b18b-3c2043b52ff2:125151353' at master log binlog.000086, end_log_pos 547512983. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
Skip_Counter: 0
Exec_Master_Log_Pos: 547458856
Relay_Log_Space: 261211881
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 1141
Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '510f1fe6-aeba-4334-b18b-3c2043b52ff2:125151353' at master log binlog.000086, end_log_pos 547512983. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
Replicate_Ignore_Server_Ids:
Master_Server_Id: 33
Master_UUID: 41f96eda-0f5a-11e9-ad75-00163e00d868
Master_Info_File: mysql.slave_master_info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State:
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp: 190704 19:57:28
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 510f1fe6-aeba-4334-b18b-3c2043b52ff2:25836646-125206230
Executed_Gtid_Set: 0b117566-0b1e-11e9-a8b4-00163e001495:1-3087343,
2479bd1b-1271-11e9-8c68-005056bd8639:1-81,
2d748950-c0fd-11e7-81f8-0050569175d7:35404018-35647968,
510f1fe6-aeba-4334-b18b-3c2043b52ff2:1-5363955:5393677-125151352,
db981f90-01f5-11e9-8d52-00163e008b14:1-4218,
e66adda1-ff8d-11e8-9d3d-00163e008b14:1-25261
Auto_Position: 0
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:

解决方法:

根据上述的主从同步信息,

Relay_Log_File: mysql-relay-bin.000486
Relay_Log_Pos: 212230586

在从库上使用mysqlbinlog将日志文件解析出来,命令如下:

mysqlbinlog  --no-defaults -v -v --base64-output=DECODE-ROWS mysql-relay-bin.000486 > /tmp/mysql-relay-bin.000486

在解析出来的文件中找到对应的POS点: 212230586

#190704 13:47:32 server id 1  end_log_pos 547458856     Xid = 4140969095
COMMIT/*!*/;
# at 212230586
#190704 13:47:32 server id 1 end_log_pos 547458917 GTID last_committed=1230803 sequence_number=1230804 rbr_only=no
SET @@SESSION.GTID_NEXT= '510f1fe6-aeba-4334-b18b-3c2043b52ff2:125151281'/*!*/;
# at 212230647
#190704 13:47:32 server id 1 end_log_pos 547459084 Query thread_id=469641862 exec_time=0 error_code=0
SET TIMESTAMP=1562219252/*!*/;
SET @@session.sql_mode=1436549152/*!*/;
REVOKE GRANT OPTION ON `f_common`.* FROM 'f_common'@'172.20.73.%'
/*!*/;
# at 212230814

发现在执行 revoke语句 删除用户权限。

查看从库上的用户库,发现没有用户 f_common。 所以就出现问题了。

问题原因已经清楚了,后续就自己处理了。

Mysql 主从报错:1141的更多相关文章

  1. MySQL主从报错1594

    一.主从报错 Relay log read failure 问题原因,MySQL主从使用的是kvm虚拟机,物理机超分严重,在负载高的情况下会kill掉占用资源最多的虚拟机,再启动后导致主从失败 mys ...

  2. MySQL主从报错解决:Failed to initialize the master info structure

    大清早收到一个MySQL的自定义语言告警 :replication interrupt,看来是主从同步报错了. 登陆MySQL,执行 show slave status \G 发现salve已经停止了 ...

  3. mysql主从报错截图

    1.首先确认报错的binlog和last event. 2.然后去主的机器上查看该报错的内容和报错的的位置,如果是结尾报错的,可以直接从新的binlog进行同步. #/mysql/logs# ../b ...

  4. MySQL主从-报错

    安装: 环境: 系统:centos7 x3 master:192.168.220.133 slave1:192.168.220.136 slave2:192.168.220.137 mysql服务器, ...

  5. 线上MYSQL同步报错故障处理总结(转)

    前言 在发生故障切换后,经常遇到的问题就是同步报错,数据库很小的时候,dump完再导入很简单就处理好了,但线上的数据库都150G-200G,如果用单纯的这种方法,成本太高,故经过一段时间的摸索,总结了 ...

  6. python 3.5.2安装mysql驱动报错

    python 3.5.2安装mysql驱动报错 python 3.5.2安装mysql驱动时出现如下异常: [root@localhost www]# pip install mysql-connec ...

  7. Loadrunner参数化连接oracle、mysql数据源报错及解决办法

    Loadrunner参数化连接oracle.mysql数据源报错及解决办法 (本人系统是Win7 64,  两位小伙伴因为是默认安装lr,安装在 最终参数化的时候,出现连接字符串无法自动加载出来: 最 ...

  8. 连接mysql数据库报错java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized...解决方法

    今天连接mysql数据库报错如下: java.sql.SQLException: The server time zone value '�й���׼ʱ��' is unrecognized or r ...

  9. MYSQL—— 启动MYSQL 57 报错“The service MYSQL57 failed the most recent........等”的问题解决方式!

    每天开机之后,启动MYSQL Notifier就报错,第一次出现重启电脑后解决,后面的几天老是出现,重启电脑好几次都没有解决,感觉很烦人,一定要搞定这个问题找到原因,于是有了下文....... 启动M ...

随机推荐

  1. 在centos8搭建dhcp服务

    1.用这两个命令就可以安装成功 yum - y install dhcp yum -y install dhcp-server.x86_64 2.配置文件在 /etc/dhcp/dhcpd.conf ...

  2. LeetCode 1257. Smallest Common Region

    原题链接在这里:https://leetcode.com/problems/smallest-common-region/ 题目: You are given some lists of region ...

  3. Codeforces Round 573 (Div.1) 题解

    这场怎么说呢……有喜有悲吧. 开场先秒了 A.看到 B,感觉有点意思,WA 了 2 发后也过了. 此时还在 rk 前 200. 开 C,一看就不可做.跟榜,切 D 人数是 C 的两倍. 开 D.一眼感 ...

  4. 第09组 Beta冲刺(3/5)

    队名:观光队 链接 组长博客 作业博客 组员实践情况 王耀鑫 过去两天完成了哪些任务 文字/口头描述 学习 展示GitHub当日代码/文档签入记录 接下来的计划 完成短租车,页面美化 还剩下哪些任务 ...

  5. [转载]3.12 UiPath存在元素Element Exists的介绍和使用

    一.Element Exists的介绍 使您能够验证UI元素是否存在,即使它不可见,输出的是一个布尔值 二.Element Exists在UiPath中的使用 1.打开设计器,在设计库中新建一个Seq ...

  6. CentOS7 Zookeeper 安装

    集群部署 192.168.38.6  zk01192.168.38.7  zk02192.168.38.8  zk03 安装zookeeper,必须安装jdk. 1.下载 $ cd /usr/loca ...

  7. java json解析(转)

    转自:https://www.cnblogs.com/sunnywindycloudy/p/8343013.html 给服务端发送请求后,服务端会返回一连串的数据,这些数据在大部分情况下都是XML格式 ...

  8. Java连载13-整数型字面值的强制转换

    一.注意点 1.大容量不能直接赋值给小容量:大容量转化为小容量需要进行,强制类型转换,强制类型转换需要加上“强制类型转换符”,加上强制类型转换符之后编译通过了但是精度会有有可能损失.所以强制类型转换要 ...

  9. 解决百度UEditor列出图片列出文件时返回的文件路径为磁盘绝对路径的问题

    替换绝对路径为空 String str = new ActionEnter(request, buffer.toString(), "config.json").exec(); S ...

  10. 那些前端二进制操作API

    一直以来,前端的工作主要涉及的是字符串操作,而对二进制的数据接触较少.但是这种需求却一直存在着,尤其是HTML5之后,随着web应用越来越复杂,File,Blob,TypedArray这些API的出现 ...