Created
August 20, 2020 02:36
-
-
Save robrich/900f04279a4b7f2ebe5bc92f5526d860 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Step_1: setup | |
Create database testDB; | |
use testDB; | |
Create table t( a int, b varchar(70)); | |
insert into t values (1, now(6)); | |
insert into t select a+(select max(a) from t), now(6) from t; | |
select count(*) from t; | |
-- Step_3: updates on primary | |
insert into t values (-1, now(6)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Step_2: replicate from primary | |
replicate database testDB from root:'rootpass'@172.17.0.3:3306/testDB; | |
-- Step_4: Verify that new updates are replicated | |
use testDB; | |
select * from t where a = -1; | |
select count(*) from t; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment