# Last\_IO\_Error: Got fatal error 1236

**URL:** <https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782>\
**Category:** Other MySQL® Questions\
**Created:** [June 30, 2013, 11:25pm UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782 "2013-06-30T23:25:58Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![systemali](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@systemali](https://forums.percona.com/u/systemali)\
**Post date:** [June 30, 2013, 11:25pm UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/1 "2013-06-30T23:25:58Z")

</div>

Hello Everyone,

My ‘master’ and the ‘replication’ server both restarted yesterday because of power outage.

Now after the things coming back to normal, My ‘replication’ server is not able to connect to the master and when i check the status on it, I see this error :-

> [@](#):
>
> mysql\> show slave status\G ;
> 
> […]
> 
> Slave\_IO\_Running: No  
> Slave\_SQL\_Running: Yes
> 
> Last\_IO\_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event ‘newcrmdb1-bin.000027’ at 580324984, the ’  
> […]

I also tried to change the values to that of master in these 2 files ( relay-log.info & master.info ) on the replication server, as i could see some discrepancy in it…but still no luck ☹

I also copied the bin file (newcrmdb1-bin.000027) from the master server to the replication server , But still the same.

Can some one suggest a recourse ?

Thank you so much for your time.

---

<div class="post-metadata">

**Author:** ![yogesh777](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@yogesh777](https://forums.percona.com/u/yogesh777)\
**Post date:** [July 1, 2013, 12:32am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/2 "2013-07-01T00:32:47Z")

</div>

After sudden reboot mysql rolled back last transactions in binary logs however slave already incremented its binary position so after master is up slave is not able to get correct binary position. To resolve this issue you need to point slave to new binary file created after the server reboot and mysql restart. The same issue happened to be just 2 days back. After setting new binary position I skipped few entries on slave which were updated on slave and rolled back in binary position.

add sync\_binlog in your master my.cnf file to updated binary files during crashes.

mysql\> show slave status\G  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 1. row \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Slave\_IO\_State:  
Master\_Host: 10.10.100.100  
Master\_User: repl  
Master\_Port: 3306  
Connect\_Retry: 60  
Master\_Log\_File: mysql-bin.000462  
Read\_Master\_Log\_Pos: 384546492  
Relay\_Log\_File: mysql-relay-bin.001388  
Relay\_Log\_Pos: 384546638  
Relay\_Master\_Log\_File: mysql-bin.000462  
Slave\_IO\_Running: No  
Slave\_SQL\_Running: Yes  
Replicate\_Do\_DB: db\_live  
Replicate\_Ignore\_DB: mysql,information\_schema,performance\_schema  
Replicate\_Do\_Table:  
Replicate\_Ignore\_Table:  
Replicate\_Wild\_Do\_Table:  
Replicate\_Wild\_Ignore\_Table:  
Last\_Errno: 0  
Last\_Error:  
Skip\_Counter: 0  
Exec\_Master\_Log\_Pos: 384546492  
Relay\_Log\_Space: 384546837  
Until\_Condition: None  
Until\_Log\_File:  
Until\_Log\_Pos: 0  
Master\_SSL\_Allowed: No  
Master\_SSL\_CA\_File:  
Master\_SSL\_CA\_Path:  
Master\_SSL\_Cert:  
Master\_SSL\_Cipher:  
Master\_SSL\_Key:  
Seconds\_Behind\_Master: NULL  
Master\_SSL\_Verify\_Server\_Cert: No  
Last\_IO\_Errno: 1236  
Last\_IO\_Error: Got fatal error 1236 from master when reading data from binary log: ‘Client requested master to start replication from impossible position; the first event ‘mysql-bin.000462’ at 384546492, the last event read from ‘./mysql-bin.000462’ at 4, the last byte read from ‘./mysql-bin.000462’ at 4.’  
Last\_SQL\_Errno: 0  
Last\_SQL\_Error:  
Replicate\_Ignore\_Server\_Ids:  
Master\_Server\_Id: 1  
1 row in set (0.00 sec)

Change the binary file position on slave to new binary file mysql-bin.000463 in above case  
change master to MASTER\_LOG\_FILE=‘mysql-bin.000463’, Master\_Log\_Pos=4;

Hope this will help you.

---

<div class="post-metadata">

**Author:** ![systemali](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@systemali](https://forums.percona.com/u/systemali)\
**Post date:** [July 1, 2013, 12:47am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/3 "2013-07-01T00:47:54Z")

</div>

Hello Yogesh,

Appreciate your prompt reply.

I am a bit unclear as to what needs to be done on the SLAVE server , I am pasting the status below for your reference :-

=============  
mysql\> show slave status \G;  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* 1. row \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
Slave\_IO\_State:  
Master\_Host: 10.222.1.218  
Master\_User: root  
Master\_Port: 3306  
Connect\_Retry: 60  
Master\_Log\_File: newcrmdb1-bin.000027  
Read\_Master\_Log\_Pos: 580324984  
Relay\_Log\_File: DatabackupSRV-relay-bin.000043  
Relay\_Log\_Pos: 4  
Relay\_Master\_Log\_File: newcrmdb1-bin.000027  
Slave\_IO\_Running: No  
Slave\_SQL\_Running: Yes  
Replicate\_Do\_DB:  
Replicate\_Ignore\_DB:  
Replicate\_Do\_Table:  
Replicate\_Ignore\_Table:  
Replicate\_Wild\_Do\_Table:  
Replicate\_Wild\_Ignore\_Table:  
Last\_Errno: 0  
Last\_Error:  
Skip\_Counter: 0  
Exec\_Master\_Log\_Pos: 580324984  
Relay\_Log\_Space: 106  
Until\_Condition: None  
Until\_Log\_File:  
Until\_Log\_Pos: 0  
Master\_SSL\_Allowed: No  
Master\_SSL\_CA\_File:  
Master\_SSL\_CA\_Path:  
Master\_SSL\_Cert:  
Master\_SSL\_Cipher:  
Master\_SSL\_Key:  
Seconds\_Behind\_Master: NULL  
Master\_SSL\_Verify\_Server\_Cert: No  
Last\_IO\_Errno: 1236  
Last\_IO\_Error: Got fatal error 1236 from master when reading data from binary log: 'Client requested master to start replication from impossible position; the first event ‘newcrmdb1-bin.000027’ at 580324984, the ’

===============

Please let me know what in the above do i need to change ?

appreciate your clarification !!

Thank you for your time !!

---

<div class="post-metadata">

**Author:** ![systemali](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@systemali](https://forums.percona.com/u/systemali)\
**Post date:** [July 1, 2013, 12:49am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/4 "2013-07-01T00:49:12Z")

</div>

Please also let me know the position of the ‘binary log file’ !!

Thank you

---

<div class="post-metadata">

**Author:** ![yogesh777](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@yogesh777](https://forums.percona.com/u/yogesh777)\
**Post date:** [July 1, 2013, 1:45am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/5 "2013-07-01T01:45:03Z")

</div>

The next binary file would be newcrmdb1-bin.000028 after mysql restart, so change master to master\_log\_file=‘newcrmdb1-bin.000028’, master\_log\_pos=4.  
I am sure this will work if you havent done much R&D on slave.

---

<div class="post-metadata">

**Author:** ![systemali](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@systemali](https://forums.percona.com/u/systemali)\
**Post date:** [July 1, 2013, 1:52am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/6 "2013-07-01T01:52:50Z")

</div>

Yogesh,

These changes need to be done on the master server ?

How do i verify what is the current values for both variable on slave and master server ?

Secondly, What is the location of these 2 variables that i need to change ?

Please guide me a little !!

Thank you

---

<div class="post-metadata">

**Author:** ![systemali](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@systemali](https://forums.percona.com/u/systemali)\
**Post date:** [July 1, 2013, 3:56am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/7 "2013-07-01T03:56:09Z")

</div>

Hello Yogesh,

Thank you for all the assistance, Well that really did help me 🙂

I was initially confused with the command that you had mentioned above 😛

[PHP]change master to MASTER\_LOG\_FILE=‘mysql-bin.000463’, Master\_Log\_Pos=4;[/PHP]

That is actually a command, I realized it later 😃 and that is what lead to the confusion 😛

Thank you once again !!

---

<div class="post-metadata">

**Author:** ![yogesh777](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@yogesh777](https://forums.percona.com/u/yogesh777)\
**Post date:** [July 1, 2013, 4:10am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/8 "2013-07-01T04:10:54Z")

</div>

According to your show slave status output your slave was on binary file newcrmdb1-bin.000027 before the reboot, after the reboot master database incremented binary file to newcrmdb1-bin.000028 and a new starting position 4, so you need to start replication from this new position, so execute change master on slave server so that slave start replicating from new position

On slave server

slave\> change master to MASTER\_LOG\_FILE=‘newcrmdb1-bin.000028’, Master\_Log\_Pos=4;  
slave\> start slave;

---

<div class="post-metadata">

**Author:** ![systemali](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@systemali](https://forums.percona.com/u/systemali)\
**Post date:** [July 1, 2013, 4:34am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/9 "2013-07-01T04:34:21Z")

</div>

Thank you so very much for the elaboration and clarification too 🙂

Highly appreciated !!

One last query though,

Where did you get the “Master\_Log\_Pos=4” from ?

Thank you 🙂

---

<div class="post-metadata">

**Author:** ![yogesh777](https://avatars.discourse-cdn.com/v4/letter/y/87869e/32.png) [@yogesh777](https://forums.percona.com/u/yogesh777)\
**Post date:** [July 1, 2013, 5:27am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/10 "2013-07-01T05:27:57Z")

</div>

> [@](#):
>
> Where did you get the “Master\_Log\_Pos=4” from ?

4 is first binary position in mysql binary log file, if you process log file using mysqlbinlog utility you can see the output.

$ mysqlbinlog mysql-bin.000004

/_!50530 SET @@SESSION.PSEUDO\_SLAVE\_MODE=1_/;  
/_!40019 SET @@session.max\_insert\_delayed\_threads=0_/;  
/_!50003 SET @OLD\_COMPLETION\_TYPE=@@COMPLETION\_TYPE,COMPLETION\_TYPE=0_/;  
DELIMITER /_!_/;  
[COLOR=#FF0000]# at 4  
#130325 16:20:55 server id 1 end\_log\_pos 107 Start: binlog v 4, server v 5.5.30-log created 130325 16:20:55 at startup

# Warning: this binlog is either in use or was not closed properly.

ROLLBACK/_!_/;  
BINLOG ’  
DyxQUQ8BAAAAZwAAAGsAAAABAAQANS41LjMwLWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA  
AAAAAAAAAAAAAAAAAAAPLFBREzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==  
'/_!_/;

# at 107

see red color text.

---

<div class="post-metadata">

**Author:** ![rachel\_gomez](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/rachel_gomez/32/7850_2.png) [@rachel\_gomez](https://forums.percona.com/u/rachel_gomez)\
**Post date:** [March 17, 2023, 5:49am UTC](https://forums.percona.com/t/last-io-error-got-fatal-error-1236/2782/11 "2023-03-17T05:49:26Z")

</div>

Tips to fix-  
Check the value of the sync\_binlog parameter on the source.  
Modify the value of sync\_binlog, and set it to 1.  
Restart the task.

Regards,  
Rachel Gomez
