Using MYSQL replication to speed up Schema changes and table optermise -


i hear many people use master - slave arrangements improve time taken when changing schemas using replication setup new temporary master, stopping relocation , swapping roles before starting again. have found example (below) found on stack overflow.

  1. setup slave
  2. stop replication.
  3. make alter on slave
  4. let slave catch master
  5. swap master , slave, slave becomes production server changed structure , minimum downtime

this well, however, dont understand step 4 isn't clear me.

i wonder if please explain procedure clearer.

let slave catch master

let slave catch master meaning slave 0 seconds behind master.

this mean if replication stopped @ point (for alter table),
register last replication time.

when replication resume,
compare current write on master last replication time on slave.

however, procedures seems flaw.
cannot alter slave and
expecting schema in updated slave same master.

in events column type changed, column dropped,
potentially lead replication failure.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -