{"id":1215,"date":"2014-11-18T00:31:19","date_gmt":"2014-11-18T00:31:19","guid":{"rendered":"http:\/\/www.omniweb.com\/wordpress\/?p=1215"},"modified":"2014-11-18T22:13:46","modified_gmt":"2014-11-18T22:13:46","slug":"fix-mysql-replication-could-not-parse-relay-log-event-entry-the-possible-reasons","status":"publish","type":"post","link":"https:\/\/www.omniweb.com\/wordpress\/?p=1215","title":{"rendered":"Fix MySQL Replication: Could not parse relay log event entry. The possible reasons are:"},"content":{"rendered":"<p>After power failures, our MySQL slaves sometimes stop replicating.  The error is:<\/p>\n<blockquote><p>Could not parse relay log event entry. The possible reasons are: the master&#8217;s binary log is corrupted (you can check this by running &#8216;mysqlbinlog&#8217; on the binary log), the slave&#8217;s relay log is corrupted (you can check this by running &#8216;mysqlbinlog&#8217; on the relay log), a network problem, or a bug in the master&#8217;s or slave&#8217;s MySQL code. If you want to check the master&#8217;s binary log or slave&#8217;s relay log, you will be able to know their names by issuing &#8216;SHOW SLAVE STATUS&#8217; on this slave.<\/p><\/blockquote>\n<p>In the past, I would <a href=\"http:\/\/www.omniweb.com\/wordpress\/?p=400\">restore replication from another slave<\/a>, but <a href=\"https:\/\/alexzeng.wordpress.com\/2013\/10\/17\/how-to-fix-mysql-slave-after-relay-log-corrupted\/\">this method seems much better<\/a> in that it&#8217;s faster and easier.<\/p>\n<p>Get the Relay_Master_Log_File and Exec_Master_Log_Pos from \u201cshow slave status\\G\u201d;<\/p>\n<blockquote><p> reset slave to that point, and let it recover by itself as follows:<br \/>\nBe careful, using Relay_Master_Log_File value from \u201cshow slave status\\G\u201d for master_log_file, not Master_Log_File value. They\u2019re the same in this case.<\/p>\n<p>mysql> slave stop;<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p>\n<p>mysql> change master to master_log_file=&#8217;LBMS-bin.000012&#8242;,master_log_pos=221245113;<br \/>\nQuery OK, 0 rows affected (0.04 sec)<\/p>\n<p>mysql> start slave;<br \/>\nQuery OK, 0 rows affected (0.00 sec)<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>After power failures, our MySQL slaves sometimes stop replicating. The error is: Could not parse relay log event entry. The possible reasons are: the master&#8217;s binary log is corrupted (you can check this by running &#8216;mysqlbinlog&#8217; on the binary log), &hellip; <a href=\"https:\/\/www.omniweb.com\/wordpress\/?p=1215\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1215"}],"collection":[{"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1215"}],"version-history":[{"count":5,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1215\/revisions"}],"predecessor-version":[{"id":1220,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/1215\/revisions\/1220"}],"wp:attachment":[{"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1215"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1215"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.omniweb.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1215"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}