当前位置: 首页 > news >正文

MySql主从同步,同步SQL_ERROR 1032解决办法

1.登录从库 mysql -u root -p

2.输入命令查看状态

SHOW SLAVE STATUS\G;

 3.找到对应的错误数据位置

  Slave_IO_Running: YesSlave_SQL_Running: NoReplicate_Do_DB: app_push_centerReplicate_Ignore_DB: Replicate_Do_Table: Replicate_Ignore_Table: Replicate_Wild_Do_Table: Replicate_Wild_Ignore_Table: Last_Errno: 1032Last_Error: Could not execute Update_rows event on table app_push_center.app_device; Can't find record in 'who_app_device', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000693, end_log_pos 28549933Skip_Counter: 0Exec_Master_Log_Pos: 28549155Relay_Log_Space: 37322136Until_Condition: NoneUntil_Log_File: Until_Log_Pos: 0Master_SSL_Allowed: NoMaster_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: NoLast_IO_Errno: 0Last_IO_Error: Last_SQL_Errno: 1032Last_SQL_Error: Could not execute Update_rows event on table who_app_push_center.app_device; Can't find record in 'who_app_device', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000530, end_log_pos 4512Replicate_Ignore_Server_Ids:

4.查看日志命令

/usr/local/mysql/bin/mysqlbinlog --no-defaults --base64-output=decode-rows -v /mysql/mysqldb/binlog.000552 |grep  -A 20 "4512"

5.具体的错误

6.再从库中,对数据进行相关的操作。

7. 重启 START SLAVE;

8.再次查看状态 SHOW SLAVE STATUS\G。如果没有错误恢复正常,有错误,继续处理。

9.正常状态

最后感谢MySQL SQL_ERROR 1032解决办法-蒲公英云

http://www.lryc.cn/news/293800.html

相关文章:

  • Webpack的性能优化
  • PyTorch中tensor.backward()函数的详细介绍
  • Linux 驱动开发基础知识——内核对设备树的处理与使用(十)
  • 编程笔记 html5cssjs 077 Javascript 关键字
  • LeetCode_19_中等_删除链表的倒数第N个结点
  • C++泛编程(3)
  • python基于django的公交线路查询系统mf383
  • ElementUI 组件:Container 布局容器实例
  • 【数据结构 09】哈希
  • 理解和管理Linux文件权限
  • 爬虫(二)
  • Flink实战四_TableAPISQL
  • 海外云手机开辟企业跨境电商新道路
  • 【51单片机系列】中断优先级介绍及使用
  • .net core 6 集成 elasticsearch 并 使用分词器
  • Unity项目从built-in升级到URP(包含早期版本和2023版本)
  • 2月4号作业
  • 瑞_23种设计模式_建造者模式
  • GA/T 1707-2019 防爆安全门检测
  • k8s学习-数据管理
  • java hutool工具类实现将数据下载到excel
  • 【C/Python】Gtk部件ListStore的使用
  • Swift 入门之自定义类型的模式匹配(Pattern Matching)
  • MySQL-----DML基础操作
  • 提前祝大家新年好!来看看社区 2023 都得了哪些奖吧
  • Redis核心技术与实战【学习笔记】 - 19.Pika:基于SSD实现大容量“Redis”
  • qt-C++笔记之contains()和isEmpty()函数、以及部分其他函数列举
  • 极速搭建幻兽帕鲁私服,叫上好友春节假期一起联机畅玩帕鲁
  • MagicVideo-V2:多阶段高保真视频生成框架
  • 【三】【C++】类与对象(二)