Home > Database > Mysql Tutorial > mysql主从问题处理记录

mysql主从问题处理记录

WBOY
Release: 2016-06-07 15:20:16
Original
1200 people have browsed it

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 mysql主从问题处理记录 Slave服务器宕机,导致Slave服务器启动后 show slave status \G 后提示错误 Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'binlog t

欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入

  mysql主从问题处理记录

  Slave服务器宕机,导致Slave服务器启动后 show slave status \G 后提示错误

  Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'binlog truncated in the middle of event'

  解决:

  Master: show master status \G    #记录 Master 以下信息

  File: mysql-MasterSlave.000006

  Position: 174367

  Slave: slave stop;

  reset slave;

  change master to master_host='192.168.1.126',master_user='USER',master_password='PW',master_log_file='mysql-MasterSlave.000006',master_log_pos=174367;

  提示:从 Mysql 5.5 开始 Mysql 加入半同步复制,取消了 load data from master 之类的用法,MySQL Slave/Master实例在异常终止恢复之后,MySQL Slave可以处理未完成的或丢弃Master写如log失败数据,从而重新从master上获取源数据,同样,Master 实例重启不会使 Slave 丢失数据。

mysql主从问题处理记录

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template