MySQL replication error 1236

Discussion in 'MySQL' started by siddharth007, Mar 11, 2014.

  1. #1
    Greetings everyone. I have set up master-slave replication between two servers with ROW based logging on the master.Everything was ok until a sudden power outage caused our servers to go down.When it was up again,the replication slave had stopped with an error 1236.This was the exact 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.000007' at 94783, the last event read from '/var/log/mysql/mysql-bin.000007' at 4, the last byte read from '/var/log/mysql/mysql-bin.000007' at 4.'
    
    Code (markup):
    Can anyone please tell what happened exactly?
     
    siddharth007, Mar 11, 2014 IP
  2. HassanKhalid

    HassanKhalid Active Member

    Messages:
    158
    Likes Received:
    6
    Best Answers:
    4
    Trophy Points:
    90
    #2
    When the server crashed the bin log was not closed properly. This is easy to fix. Go back to the slave server, stop the slave, reset the bin log position and start the server.
     
    HassanKhalid, Mar 11, 2014 IP
  3. siddharth007

    siddharth007 Greenhorn

    Messages:
    23
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    Hey thanx for the reply.So you mean to say that resetting the binlog position to log file=mysql-bin.000007 and log pos=4 will fix this.
     
    siddharth007, Mar 11, 2014 IP
  4. HassanKhalid

    HassanKhalid Active Member

    Messages:
    158
    Likes Received:
    6
    Best Answers:
    4
    Trophy Points:
    90
    #4
    yes.
     
    HassanKhalid, Mar 11, 2014 IP