MySQL断电出现 Error 1236该怎么办


MySQL断电出现 Error 1236该怎么办,很多新手对此不是很清楚,为了帮助大家解决这个开发云主机域名难题,下面小编将为大家详细讲解,有这方面需求的人可以来学习下,希望你能有所收获。今天几台MySQL服务器突然停电,重启后复制无法启动,总是报如下错误:080922 10:29:01 [Note] Slave SQL thread initialized, starting replication in log ‘mysql-bin.000778’ at position 2874108, relay log ‘
./relay-bin.003287′ position: 2874245
080922 10:29:01 [Note] Slave I/O thread: connected to master ‘replication@192.168.0.10:3306’, replication started in log ‘mysql-b
in.000778′ at position 2874108
080922 10:29:01 [ERROR] Error reading packet from server: Client requested master to start replication from impossible position ( se
rver_errno=1236)
080922 10:29:01 [ERROR] Got fatal error 1236: ‘Client requested master to start replication from impossible position’ from master wh
en reading data from binary log[@more@]为什么会报impossible position呢?打开mysql-bin.000778看看。mysqlbinlog mysql-bin.000778 > log.sqltail -f log.sql# at 2871574
#080922 10:20:27 server id 2 end_log_pos 2871601 Xid = 2516638
COMMIT/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/最后一个position是2871574,而从库要从2874108开始,难怪报impossible position,难道是断电时有部分log在缓存中还没来得及写入binglog?无论如何先恢复再说吧stop slave;CHANGE MASTER TO
MASTER_LOG_FILE=’mysql-bin.000778′,
MASTER_LOG_POS=2871574;start slave;show slave statusG同步正常。。后来查看主库的启动日志中这样一段InnoDB: Last MySQL binlog file position 0 2874108, file name ./mysql-bin.000778
080922 10:22:09 InnoDB: Started; log sequence number 6 2534366248
080922 10:22:09 [Note] Recovering after a crash using mysql-bin
080922 10:22:09 [Note] Starting crash recovery…
080922 10:22:09 [Note] Crash recovery finished.
080922 10:22:09 [Note] /usr/sbin/mysqld: ready for connections.这里Last MySQL binlog file position 0 2874108也是错误的,这个信息到底是哪里来的呢?为什么会这样呢?不明白。为了保证以后binglog及时写入,将主库sync_binlog变量设置1。看完上述内容是否对您有帮助呢?如果还想对相关知识有进一步的了解或阅读更多相关文章,请关注开发云行业资讯频道,感谢您对开发云的支持。

相关推荐: Excel如何录入权限矩阵

这篇文章给大家介绍Excel如何录入权限矩阵,内容非常详细,感兴趣的小伙伴们可以参考借鉴,希望对大家能有所帮助。 领导要录入一个权限矩阵的数据数据库,问我有没有什么好办法?能说没有么?通篇Excel都是类似如下的矩阵,矩阵非常多,每个矩阵还非常大.创建测试表…

免责声明:本站发布的图片视频文字,以转载和分享为主,文章观点不代表本站立场,本站不承担相关法律责任;如果涉及侵权请联系邮箱:360163164@qq.com举报,并提供相关证据,经查实将立刻删除涉嫌侵权内容。

Like (0)
Donate 微信扫一扫 微信扫一扫
Previous 06/27 17:28
Next 06/27 17:28

相关推荐