bitsCN.com

MySQL 1236错误解决方法

由于主服务器异外重启, 导致从报错, 错误如下:

show slave status错误:

mysql> show slave status/G

Master_Log_File: mysql-bin.000288

Read_Master_Log_Pos: 627806304

Relay_Log_File: mysql-relay-bin.000990

Relay_Log_Pos: 627806457

Relay_Master_Log_File: mysql-bin.000288

Slave_IO_Running: No

Slave_SQL_Running: Yes

Exec_Master_Log_Pos: 627806304

Relay_Log_Space: 627806663

......

Last_IO_Error: Got fatal error 1236 from master when reading data from binary log:

'Client requested master to start replication from impossible position'

mysql错误日志:

tail /data/mysql/mysql-error.log

111010 17:35:49 [ERROR] Error reading packet from server: Client requested master

to start replication from impossible position ( server_errno=1236)

111010 17:35:49 [ERROR] Slave I/O: Got fatal error 1236 from master when reading data

from binary log: 'Client requested master to start replication from impossible

position', Error_code: 1236

111010 17:35:49 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.000288',

position 627806304

[root@db1 ~]# mysqlbinlog /data/mysql/binlog/mysql-bin.000288 > mysql-bin.000288.sql

less mysql-bin.000288.sql

看最后一部分

# at 627625495

#111010 16:35:46 server id 1 end_log_pos 627625631 Query thread_id=45613333

exec_time=32758 error_code=0

SET TIMESTAMP=1318289746/*!*/;

delete from freeshipping_bef_update where part='AR-4006WLM' and code=''

/*!*/;

# at 627625631

#111010 16:35:46 server id 1 end_log_pos 627625751 Query thread_id=45613333

exec_time=32758 error_code=0

SET TIMESTAMP=1318289746/*!*/;

delete from shippingFee_special where part='AR-4006WLM'

/*!*/;

DELIMITER ;

# End of log file

ROLLBACK /* added by mysqlbinlog */;

/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

找到最接近错误标记627655136的一个position是627625631.

再回到slave机器上change master, 将postion指向这个位置.

mysql> stop slave;

Query OK, 0 rows affected (0.00 sec)

mysql> change master to master_log_file='mysql-bin.000288',master_log_pos=627625631;

Query OK, 0 rows affected (0.06 sec)

mysql> start slave;

Query OK, 0 rows affected (0.00 sec)

再次查看

mysql> show slave status/G

*************************** 1. row ***************************

Slave_IO_State: Queueing master event to the relay log

Master_Host: 192.168.21.105

Master_User: rep

Master_Port: 3306

Connect_Retry: 10

Master_Log_File: mysql-bin.000289

Read_Master_Log_Pos: 25433767

Relay_Log_File: mysql-relay-bin.000003

Relay_Log_Pos: 630

Relay_Master_Log_File: mysql-bin.000289

Slave_IO_Running: Yes

Slave_SQL_Running: Yes

主从同步正常了, 同样的方法修复其它slave机器.

bitsCN.com

本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉

本文系统来源:php中文网

1236mysql_MySQL1236错误解决方法_MySQL相关推荐

  1. apmserv mysql_APMServ MySQL 1577错误解决方法_MySQL

    bitsCN.com APMServ MySQL 1577错误解决方法 Navicat导出任何一个数据库,都会提示:1577 – Cannot proceed because system table ...

  2. mysql常见错误解决方法_mysql常见错误解决办法

    解决mysql利用二进制日志恢复数据报错:ERROR 1781 (HY000) at line 16: @@SESSION.GTID_NEXT cannot be set to UUID:NUMBER ...

  3. Maven 的Could not calculate build plan错误解决方法(不一定适用,看原因)

    Maven 的Could not calculate build plan错误解决方法(不一定适用,看原因): 1.将C:\Users\a\.m2\repository\org\apache\mave ...

  4. 一条命令下载google壁纸,含错误解决方法

    该命令是从google图片搜索上搜索wallpaper的大尺寸图片,匹配其中的jpg文件进行下载. #!/bin/bash for i in {1..10}; do     for url in $( ...

  5. Centos系统上安装php遇到的错误解决方法集锦

    Centos系统上安装php遇到的错误解决方法集锦 1.configure: error: xml2-config not found. Please check your libxml2 insta ...

  6. mysql 1236_Mysql主从同步Last_IO_Errno:1236错误解决方法

    Mysql主从同步的Last_IO_Errno:1236错误是什么原因呢,我们要如何来解决这个问题呢?下面和小编一起来看看关于此问题的记录与解决办法. 从服务器错误代码: Last_IO_Errno: ...

  7. python导入模块报错syntaxerror_SyntaxError: invalid syntax python错误解决方法

    今天爱分享给大家带来SyntaxError: invalid syntax python错误解决方法,希望能够帮助到大家. "SyntaxError: invalid syntax" ...

  8. X509证书 指定了无效的提供程序类型 System.Security.Cryptography.CryptographicException 错误解决方法

    X509证书 指定了无效的提供程序类型 System.Security.Cryptography.CryptographicException 错误解决方法 参考文章: (1)X509证书 指定了无效 ...

  9. Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法

    Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法 参考文章: (1)Windows IIS注册asp 此操作系统版本不支持此选项 错误解决方法 (2)https://www. ...

  10. “ld: symbol(s) not found for architecture i386“错误解决方法

    "ld: symbol(s) not found for architecture i386"错误解决方法 参考文章: (1)"ld: symbol(s) not fou ...

最新文章

  1. 2020-11-10(回传递过程)
  2. Linux server配置安装Java,Tomcat服务器
  3. 解析鸿蒙内核消息队列QueueMail接口的哼哈二将
  4. BZOJ4372: 烁烁的游戏【动态点分治】
  5. 为 Analysis Services 数据库使用扩展字段属性(SQL Server 2005 联机丛书(2008 年 11 月))...
  6. 碱度控制化学品行业调研报告 - 市场现状分析与发展前景预测
  7. 修改常见服务器的banner
  8. 史上最全40道dubbo面试题
  9. js锅打灰太狼(小游戏)
  10. android 北斗测试,安卓手机查看是否支持北斗导航系统的详细检测方法
  11. 锐龙R5 4500 怎么样 相当于什么水平
  12. 教你怎么去创建一个代币!
  13. Cravatar头像
  14. 侃一侃人工智能2-零散的人工智能概念
  15. 视频流媒体服务器EasyNVR直播平台如何搭建幼儿园网络监控系统?
  16. 解决vscode扩展商店不能连接
  17. ArcGIS环境搭建及地图服务发布
  18. 《中级数据库系统工程师》
  19. autojs之浩然ocr-不安装插件就能用ocr
  20. 怎么恢复格式化的u盘文件

热门文章

  1. 利润表三点式审阅:以御银股份为例
  2. delphi mysql.pas_Delphi 一些pas
  3. fastadmin页面日期时间组件的调用
  4. 命令行测速工具 linux,Linux命令行下常用的网络测速工具
  5. python编程自学网-python自学网
  6. lvgl chart
  7. YOLOV5 网络模块解析
  8. 如何恢复 TrustedInstaller 所有者权限;怎么给文件夹权限添加“所有受限制的应用程序包”这个用户主体:
  9. 双绞线传输距离_双绞线电缆施工“潜规则”
  10. 联想服务器重装系统快捷键,联想电脑重装系统按什么快捷键