Link to home
Start Free TrialLog in
Avatar of dealclickcouk
dealclickcouk

asked on

MySQL replication error

I've had replication working for sometime, but I have an issue now that the slave wont start.  When I START SLAVE, it reports no errors, however when I SHOW SLAVE STATUS it says Slave_IO_Running=No, but Slave_SQL_Running=Yes

When I look in the slaves err log I see:

071007 14:45:08 [Note] Slave I/O thread: connected to master '<user>@<master_server>:3306',  replication started in log 'localhost-bin.038' at position 203793038
071007 14:45:09 [ERROR] Error reading packet from server: Client requested master to start replication from impossible position (server_errno=1236)
071007 14:45:09 [ERROR] Got fatal error 1236: 'Client requested master to start replication from impossible position' from master when reading data from binary log
071007 14:45:09 [ERROR] Slave I/O thread exiting, read up to log 'localhost-bin.038', position 203793038


Any suggestions on what this problem is and how I fix it would be most welcome.

Thx
Avatar of chingmd
chingmd

Taken from this site:

http://www.nabble.com/Client-asks-master-to-start-rep-from-impossible-position-t3641184.html



MASTER_LOG_FILE and MASTER_LOG_POS are the coordinates at which the slave
I/O thread should begin reading from the master the next time the thread
starts, but this pointers got corrupted and is impossible for slave to read
at that position from the master binary log. Do the following steps in the
slave node to recover it.

----------------------
stop slave;
reset slave;
start slave;
--------------------

RESET SLAVE makes the slave forget its replication position in the master's
binary logs. This statement is meant to be used for a clean start: It
deletes the master.info and relay-log.info files, all the relay logs, and
starts a new relay log.
Avatar of dealclickcouk

ASKER

so what happens to any changes that are in the logs, will the slaves loose these?  

Is there no way to recover the changes from the master from this?
ASKER CERTIFIED SOLUTION
Avatar of chingmd
chingmd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial