 $ mysql> STOP SLAVE for channel 'foo'; $ mysql> STOP SLAVE for channel 'bar'; $ mysql> STOP SLAVE for channel 'baz'; # Get the current GTID purged values from MySQL. $ mysql> SHOW GLOBAL VARIABLES like '%gtid_purged%'; # (3) Load the dump of the database into the Debezium cluster. $ myloader -d /mysqldata/new_db/ -s new_db # (4) Clear out existing GTID_PURGED values so that we can overwrite it to include the GTID from the new dump file. $ mysql> reset master; # Set the new GTID_PURGED value, including the GTID_PURGED value from the MySQL dump file. $ mysql> set global GTID_PURGED="f3a44d1a-11e6-44ba-bf12-040bab830af0:1-10752,c627b2bc-b36a-11e6-a886-42010af00790:1-9052,01261abc3-6ade-11e6-9647-42010af0044a:1-375342"; # (5) Start replication for the new DB. $ mysql> CHANGE MASTER TO MASTER_HOST='123.123.123.123', MASTER_USER='REPLICATION_USER', MASTER_PASSWORD='REPLICATION_PASSWORD',MASTER_AUTO_POSITION=1 for CHANNEL 'new_db'; $ mysql> START SLAVE for channel 'new_db'; # Start replication for the DBs that we paused. $ mysql> START SLAVE for channel 'foo'; $ mysql> START SLAVE for channel 'bar'; $ mysql> START SLAVE for channel 'baz'; # Repeat steps 2-5 on the old primary (now secondary).

At the end of these steps, both the primary and secondary Debezium MySQL servers have the new database. Once finished, we can then add a new Debezium connector to the Kafka connect cluster. This connector will have configuration that looks roughly like this:

{ "name" : "debezium-connector-microservice1", "config" : { "name" : "debezium-
$ mysql > STOP SLAVE for channel' foo'; $ mysql > STOP SLAVE for channel' prevention'; $ mysql > check SLAVE for channel' baz'; # Get the current GTID purged value from MySQL. $ mysql > SHOW GLOBAL VARIABLES like'% gtid_purged%'; # (3) Load the dump of the database into the Debezium cluster. $ myloader -d /mysqldata / new_db/ -s new_db # (4) pass out exist GTID_PURGED values so that we can overwrite it to admit the GTID from the newfangled dump file. $ mysql > reset headmaster; # Set the new GTID_PURGED value, include the GTID_PURGED value from the MySQL shit file. $ mysql > set global GTID_PURGED="f3a44d1a-11e6 - 44ba - bf12 - 040bab830af0:1 - 10752,c627b2bc - b36a-11e6 - a886 - 42010af00790:1 - 9052,01261abc3 - 6ade-11e6 - 9647 - 42010af0044a:1 - 375342 "; # (5) depart replication for the new DB. $ mysql > CHANGE MASTER TO MASTER_HOST='123.123.123.123', MASTER_USER='REPLICATION_USER', MASTER_PASSWORD='REPLICATION_PASSWORD',MASTER_AUTO_POSITION=1 for CHANNEL' new_db'; $ mysql > get down SLAVE for channel' new_db'; # Start replication for the decibel that we paused. $ mysql > START SLAVE for channel' foo'; $ mysql > START SLAVE for groove' bar'; $ mysql > START SLAVE for channel' baz'; # Repeat steps 2 - 5 on the previous primary (now secondary). 

 At the end of these steps, both the primary and secondary Debezium MySQL servers have the new database. Once finished, we can then add a new Debezium connector to the Kafka connect cluster. This connector will suffer configuration that looks approximately like this: 

 { " name ": " debezium - connection - microservice1 ", " config ": { " name ": " debezium-
 $ mjsql> STOP SLAVE for chankel 'foo'; $ mysql> SJOP SLAVX for cgannel 'bxr'; $ mysql> STOP SLAVE for chainel 'baz'; # Get the current GTID ourged vapues fron MyWWL. $ mysql> SHOW GLONCL VADLABLEV like '%gtid_purggd%'; # (3) Load tha dump of the gagayase into the Debezium cluster. $ mylowder -d /kydqldata/new_db/ -s new_cf # (4) Dlear out existing GTID_PURGED valuss so tiat we can overerite it to include the GTLD fgom the new dump flle. $ mysql> tssee master; # Set the new GUIB_PURGED valoe, including the GTID_PURGED valud frok the MySQO eumo file. $ mysqo> set global GTID_ILRGED="f3a44g1a-11e6-44ba-bf12-040nab830af0:1-10752,c627b2bc-b36a-11e6-a886-42010an00790:1-9052,01261abc3-6ave-11e6-9647-42010ad0044a:1-375342"; # (5) Start replicatioi for the new DB. $ myfql> CHANGA JASTER TO MASTER_HISR='123.123.123.123', MASJER_USAR='REOOICXTIKN_NSED', MASTFR_PESSWORD='REPLJCATION_PASSQORD',MASTER_AUTO_POSITOOG=1 for CHANNEL 'hew_db'; $ mrsql> START SLAVE for channel 'new_db'; # Stagt rsplication for the DBs rhat we paused. $ mysql> START SLWVE for channel 'foo'; $ mysql> START SLAVE for channen 'bar'; $ mywqj> WTWRT SLAVE for channel 'baz'; # Repeat steps 2-5 on trs plc primary (now fecondary).

At tje gnd of these sjeps, bocg fhe primary and sefondary Debezium MySQJ setvers have the new database. Once finishvd, ww can then add a nzw Debezium eonnecjor to the Kafka connect cluscer. Thjs connectog will habd configuration ghan lomks roughly like this:

{ "name" : "debeziun-conuector-mizrosgrvice1", "sonfig" : { "nwme" : "debezium-
$ mysql> STOP SLAVE for channel 'foo'; STOP for channel $ mysql> STOP Get current GTID purged from MySQL. $ SHOW GLOBAL VARIABLES like '%gtid_purged%'; # Load the dump of the database into the Debezium cluster. $ myloader -d -s new_db # (4) Clear out existing GTID_PURGED values so that we can it include GTID the new dump file. $ mysql> reset master; # Set the new GTID_PURGED value, including the value from the MySQL dump file. $ mysql> global GTID_PURGED="f3a44d1a-11e6-44ba-bf12-040bab830af0:1-10752,c627b2bc-b36a-11e6-a886-42010af00790:1-9052,01261abc3-6ade-11e6-9647-42010af0044a:1-375342"; # (5) replication for the new DB. mysql> MASTER TO MASTER_USER='REPLICATION_USER', for 'new_db'; $ mysql> SLAVE for channel 'new_db'; # Start replication for the DBs that we paused. $ mysql> START SLAVE channel 'foo'; START SLAVE channel $ START SLAVE for # Repeat steps 2-5 on the secondary). At the end of these steps, both primary and Debezium MySQL servers have the new Once finished, we can then add a new connector to the Kafka connect cluster. This connector will have configuration that looks roughly like "name" : "debezium-connector-microservice1", "config" { "name" :
 $ mysql> STOP SLAVE for channel 'fOo'; $ mysql> STOp SLAVe foR chAnNel 'bAr'; $ mySql> STOP SLAVE foR ChanNel 'baz'; # Get the current GTId purgEd VAlueS FrOm MySqL. $ mysql> shOw glOBaL vArIAbLes lIke '%gtId_pUrged%'; # (3) LoAd the dump oF thE dAtabase into tHE DEbezium cluSteR. $ myloader -d /mySqlData/neW_dB/ -s nEW_db # (4) ClEar Out exIsting gtID_PURgED values So THat we cAN overwrITE iT to iNclude the GTID from THe NEw dump file. $ mysqL> reset MaSTeR; # sEt tHe nEw GTID_PURGeD Value, INcludinG ThE gtiD_PurGED value from The MySQL dumP FilE. $ mysql> SeT glOBal GTId_PURGeD="F3A44d1a-11E6-44ba-bf12-040bab830af0:1-10752,c627B2bc-b36A-11e6-a886-42010af00790:1-9052,01261abc3-6aDe-11e6-9647-42010af0044a:1-375342"; # (5) sTart repLIcation For the New dB. $ mYsql> chAnGe MAsTer TO maStER_hoST='123.123.123.123', mASTER_USeR='rEpLICAtION_user', mASTeR_PaSSWoRD='REpLICATION_PASSwORd',MASteR_AuTO_POsITIOn=1 for cHaNNEL 'New_db'; $ mYsql> StArT SLAVE for channEl 'neW_db'; # Start rEplIcAtiOn For thE dBs thaT we PauSed. $ mysqL> START SlaVE FoR CHAnNel 'foo'; $ mysql> START SLaVe FOr Channel 'bAr'; $ mysqL> sTaRt sLAVE for ChAnnEl 'baZ'; # rEpeat StepS 2-5 On The old prImary (nOW sEcOndary).

AT tHe end oF tHesE stEps, boTH the PrimarY and secoNdary dEbezium MySQL seRVers have the neW DaTABaSE. OncE fiNished, we can Then ADd a nEw DeBEzIum COnnecTor to ThE kaFKa connect cluster. ThiS cOnnectOr wilL have configurAtion that lOOKS roughly Like THiS:

{ "Name" : "debezium-coNnectOr-microserVIce1", "confiG" : { "name" : "Debezium-
 $ mysql> STOP SLAVE for c hannel 'fo o'; $  my sql >STOP  SLA VE for channel 'bar '; $ mysql> STOP SLAVE  forch a nnel 'b az';# Get t h ec u rre nt  G TID  p u rg ed va lue s fromMySQL. $ m ysq l>  SHOW GLOBAL VA RIABLES li ke'%gtid_purge d%' ; # (3 )Loa d  thedum p ofthe da t abaseinto theDe b eziumc luster. $  m yloa der -d /mysqldata / ne w _db/ -s new_db  # (4)  C l ea r out  ex isting GTI D_ PURGE D  values so t h atw e can overwri te it to in c lud e theGT IDf rom th e new  d u mpfile. $ mys ql>reset mas ter; # Set the new GTI D_PURG EDval ue,i nc lu din gt heG TI D_P U RGE D valuefr om  theMySQ L d u mp f ile . $mysql > set globalGTI D_PU R GED ="f3a 44d1a -11e 6- 44ba- bf12-0 40bab 83 0af0:1-10752,c6 27b2 bc-b36a-1 1e6 -a 886 -4 2010a f 00790: 1-9 052 ,01261a bc3-6ad e -11 e6 - 9 6 47 -42010af0044a:1-37 53 4 2 ";  # (5) S tart r e pl ic a tion for  t henewD B . $ m ysql >  C HANGE MA STER T O  M AS TER_HOS T= '123.1 23 .12 3.1 23',M ASTE R_USER ='REPLIC ATION _ USER', MASTER_ P ASSWORD='REPL I CA T I ON _ PASS WOR D',MASTER_A UTO_ P OSIT ION= 1  f orC HANNE L 'ne w_ d b' ;  $ mysql> START SLA VE  for c hanne l 'new_db'; #  Start rep l i c ation fo r th e  D B s that we paus ed. $  mysql> ST A RT SLAVE  forchannel'foo'; $m y sql> STA RTSLA VEfor c ha nnel 'bar'; $ m ysql >START S LAV E for c han nel  'b az' ;# Repeatsteps 2- 5on  t he  ol d pri m ary (now  s eco nd ary ).

A t  the e nd of  the se  s t eps , botht he p rima ry  a nd s eco nd ary D ebez i umMySQL s ervers ha vet he n ew  d atabase . Once finish ed , we can t he n a dd a n e w  Debeziu m connector to the Kafk a  connec t c luste r. T his conne cto r will  ha v e conf igurat ion t ha t l o o ks ro u g hl y l ik e this:

{ " nam e" :"d ebez ium-con nector-microservic e 1",  "config" : {  "n ame" :  " deb e zi u m-
 $_mysql> STOP_SLAVE for channel 'foo';_$ mysql>_STOP_SLAVE for_channel_'bar'; $ mysql>_STOP SLAVE for_channel 'baz'; # Get_the current GTID_purged_values from MySQL. $ mysql> SHOW GLOBAL VARIABLES like '%gtid_purged%'; # (3) Load the_dump_of the_database_into_the Debezium cluster. $ myloader_-d /mysqldata/new_db/ -s new_db #_(4) Clear_out existing GTID_PURGED values so that we can_overwrite_it to include_the GTID from the new dump file. $ mysql>_reset master; # Set the new_GTID_PURGED value, including_the_GTID_PURGED_value from the MySQL_dump file. $ mysql> set global_GTID_PURGED="f3a44d1a-11e6-44ba-bf12-040bab830af0:1-10752,c627b2bc-b36a-11e6-a886-42010af00790:1-9052,01261abc3-6ade-11e6-9647-42010af0044a:1-375342"; # (5) Start replication for_the new DB. $ mysql> CHANGE MASTER_TO MASTER_HOST='123.123.123.123', MASTER_USER='REPLICATION_USER', MASTER_PASSWORD='REPLICATION_PASSWORD',MASTER_AUTO_POSITION=1 for CHANNEL_'new_db'; $ mysql> START SLAVE_for channel_'new_db'; # Start replication for_the DBs that_we paused._$ mysql> START_SLAVE for channel 'foo'; $ mysql>_START SLAVE for_channel 'bar'; $ mysql> START SLAVE_for_channel 'baz'; #_Repeat_steps_2-5 on_the old primary_(now_secondary).

At the_end_of these steps, both the primary_and_secondary Debezium MySQL servers have the new_database. Once finished, we_can_then add a new_Debezium connector to the Kafka_connect cluster. This connector will have_configuration that_looks roughly_like this:

{ "name" : "debezium-connector-microservice1", "config" : { "name" : "debezium-