Comments on: MySQL Replication: ‘Got fatal error 1236’ causes and cures https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/ Mon, 02 Oct 2023 14:00:42 +0000 hourly 1 https://wordpress.org/?v=6.5.2 By: Max T. https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10968583 Tue, 24 Oct 2017 08:16:17 +0000 https://www.percona.com/blog/?p=25864#comment-10968583 Using fix for “binlog truncated in the middle of event” replication might be broken down if the binlog is actually correct and contains events after mentioned position (the binlog file can be checked by “mysqlbinlog”). Instead of switching to the next file, “reset slave” and “change master” with the event start position can be used.

]]>
By: Scott Warren https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10965955 Thu, 03 Mar 2016 13:30:32 +0000 https://www.percona.com/blog/?p=25864#comment-10965955 Thanks for the guide it was helpful fixing our problem.

I just wanted to point out that in this command you’re using 10711.

$ mysqlbinlog –base64-output=decode-rows –verbose –verbose –start-position=55212580 mysql-bin.010711

And in the command below you’re using 712 but you say it should be the next file. I thought you might want to correct this so it causes less confusion (I powered through it but others might not :-))

mysql> CHANGE MASTER TO MASTER_LOG_FILE=’mysql-bin.000712′, MASTER_LOG_POS=4;

]]>
By: Sungwon Um https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10965610 Thu, 26 Nov 2015 00:38:53 +0000 https://www.percona.com/blog/?p=25864#comment-10965610 I found another case for this error message :

Got fatal error 1236 from master when reading data from binary log: ‘Could not find first log file name in binary log index file’

The issue occurred after I update mysql config file (/etc/my.cnf) in master DB.
In config file, log-bin was set as ‘/var/lib/mysql/mysql-bin’.
I changed it into ‘mysql-bin’.

Then, the error above occurs in slave databases.

To resolve this case,
I opened the bin-log index file (mysql-bin.index) from master DB.

It showed like this.
————-
/var/lib/mysql/mysql-bin.000007
/var/lib/mysql/mysql-bin.000008
./mysql-bin.000009
————-

I edited old bin-log URI format to new one
————-
./mysql-bin.000007
./mysql-bin.000008
./mysql-bin.000009
————-

Then restart master db, stop slave and start slave in order.
The issue has gone.

]]>
By: Jonathan Nicol https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10965361 Mon, 21 Sep 2015 20:54:00 +0000 https://www.percona.com/blog/?p=25864#comment-10965361 Brent and Gauravkumar: I just had the same issue. I couldn’t figure out the root cause, but simply running ‘start slave;’ on the slave fixed it.

]]>
By: Gauravkumar Mishra https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10949031 Mon, 07 Sep 2015 10:21:50 +0000 https://www.percona.com/blog/?p=25864#comment-10949031 Hi Brent , even I faced the same issue. My error looks like “Got fatal error 1236 from master when reading data from binary log: ‘could not find next log; the first event ‘mysql-bin.000784’ at 203062471, the last event read from ‘/ntss_data/mysql/mysql-bin.000818’ at 1073742606, the last byte read from ‘/ntss_data/mysql/mysql-bin.000818’ at 1073742606.'” Weer you able to figure out the cause of this issue?

]]>
By: Brent Clark https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10842921 Mon, 08 Jun 2015 01:58:10 +0000 https://www.percona.com/blog/?p=25864#comment-10842921 What if the message is not ….*Could not find first log*
but instead, ‘could not find next log;

Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: ‘could not find next log; the first event ‘mysql-bin.000208’ at 8223714, the last event read from ‘/var/log/mysql/mysql-bin.000511’ at 104858051, the last byte read from ‘/var/log/mysql/mysql-bin.000511′ at 104858051.’

]]>
By: André Luiz de Almeida https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10823795 Mon, 25 May 2015 21:06:33 +0000 https://www.percona.com/blog/?p=25864#comment-10823795 Thanks man

Very clear and very simple, Solved my situation here too.

]]>
By: Tu Nguyen https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10301786 Fri, 19 Dec 2014 02:17:30 +0000 https://www.percona.com/blog/?p=25864#comment-10301786 hi Muhammad Irfan, in my case, my master crashed. At that time, my slave became master (data wrote on slave). Then master reboot.
I still want master is master (not slave becomes master) but there is error 1236 just exactly the last sample on your post.
What should I do?
Thanks in advances,

]]>
By: Mark Grennan https://www.percona.com/blog/mysql-replication-got-fatal-error-1236-causes-and-cures/#comment-10298485 Wed, 17 Dec 2014 21:28:45 +0000 https://www.percona.com/blog/?p=25864#comment-10298485 Thanks! This was exactly my problem. Your explanation was clear and I fixed my server quickly.

]]>