ITPub博客

首页 > Linux操作系统 > Linux操作系统 > mysql slave 损害一例

mysql slave 损害一例

原创 Linux操作系统 作者:babyyellow 时间:2013-02-25 12:11:21 0 删除 编辑
2-24 号下午2点左右,238.192主库宕机了,

及时的处理了问题, 服务恢复。

检查从库的时候报错了:

Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position'

日志里记录了bin-log 的信息:  ‘mysql-bin-217.log'  position 29727668

我们从主库的日志里看到了一个错误:

[code]
130224 14:14:40 InnoDB: highest supported file format is Barracuda.
InnoDB: Log scan progressed past the checkpoint lsn 17843973211
130224 14:14:40  InnoDB: Database was not shut down normally!
InnoDB: Starting crash recovery.
InnoDB: Reading tablespace information from the .ibd files...
InnoDB: Restoring possible half-written data pages from the doublewrite
InnoDB: buffer...
InnoDB: Doing recovery: scanned up to log sequence number 17843973319
InnoDB: Last MySQL binlog file position 0 29727668, file name ./mysql-bin.000217
130224 14:14:45  InnoDB: Waiting for the background threads to start
130224 14:14:46 InnoDB: 1.1.5 started; log sequence number 17843973319
130224 14:14:46 [Note] Recovering after a crash using mysql-bin
130224 14:14:46 [ERROR] Error in Log_event::read_log_event(): 'read error', data_len: 1690, event_type: 24
130224 14:14:46 [Note] Starting crash recovery...
130224 14:14:46 [Note] Crash recovery finished.
[/code]

数据库在这个bin-log的position上出问题了,应该是当时这个position 没有写到log里,我们在mysql_binlog dump 这个日志的时候,也报错了

这个日志可能坏掉了。

马上对主库执行全备份。

当时主库的主机假死了,只能ping,无法登录了,所以就重启了,这个过程可能造成了,bin-log的数据写磁盘出现故障。


slave 机器无法继续同步了,用xtrabackup  备份主库,然后重做从库了。

 

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/133735/viewspace-754669/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: sort 用法一例
请登录后发表评论 登录
全部评论
oracle MySQL Postgresql 专职数据库dba。 系统架构师。 mysql 官方认知dba 。 15年专职dba 经验。 潜意识沟通实证者 心理咨询师。 禅修布道者, 禅修指导员。 禅定实证者。

注册时间:2010-12-02

  • 博文量
    367
  • 访问量
    1908855