mysql replication skip statement. is it possible? -


there system row-based replication. yesterday have executed heavy statement on master accidently , found slaves far behind master. have interrupted query on master, still running on slaves. got slaves 15 hours behind master.

i have tried step on 1 position resetting slave , increasing master_log_pos, no luck: position wasn't found, because relay log wasn't read further heavy query event.

read_master_log_pos == exec_master_log_pos 
  • is there way skip heavy query? (i don't care data has changed query)
  • is there way kill query on slave taken relay log?
  • is there way roll slaves in 1 position, remove event master bin-log , resume replication?

first explore binary logs on master find sql statement causing issue, using following on master:

show binlog events in 'mysql-bin.000xxx' limit 100; 

then set slave sync statement before that:

stop slave; start slave until master_log_file = 'log_name', master_log_pos = log_pos; 

when want carry on replication after bad statement (warning, can dangerous if statement changed data) can tell slave continue specific point in masters log. position using first command on master, set slave go:

change master master_log_file='mysql-bin.000663', master_log_pos=4; start slave; 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -