-
Notifications
You must be signed in to change notification settings - Fork 25
/
mysql-replication
52 lines (39 loc) · 2.96 KB
/
mysql-replication
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
CREATE USER 'teeworlds'@'localhost' IDENTIFIED BY 'SECRETPASS';
GRANT ALL PRIVILEGES ON teeworlds.* TO 'teeworlds'@'localhost' IDENTIFIED BY 'SECRETPASS';
CREATE USER 'repl'@'115.29.35.233' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION CLIENT ON *.* TO 'repl'@'localhost' IDENTIFIED BY 'SECRETREPL';
STOP SLAVE;
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'185.37.147.11' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'74.91.114.132' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'151.248.116.14' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'130.185.74.202' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'112.124.108.6' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'130.185.74.93' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'190.114.253.157' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'41.185.26.5' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'176.31.125.151' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'95.172.92.151' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'178.33.191.10' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'192.99.185.158' IDENTIFIED BY 'SECRETREPL';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'181.41.210.80' IDENTIFIED BY 'SECRETREPL';
FLUSH PRIVILEGES;
SHOW MASTER STATUS;
On chn.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='ger.ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mysql-bin.000010', MASTER_LOG_POS=37941939;
On usa.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='chn.ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mysql-bin.000134', MASTER_LOG_POS=22912224;
On can.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='usa.ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mysql-bin.000167', MASTER_LOG_POS=4812977;
On bra.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='can.ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mysql-bin.000009', MASTER_LOG_POS=54147729;
On chl.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='bra.ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mysql-bin.000013', MASTER_LOG_POS=54147743;
On zaf.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='chl.ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mysql-bin.000066', MASTER_LOG_POS=24266313;
On rus.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='zaf.ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mysql-bin.000009', MASTER_LOG_POS=45286706;
On fra.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='rus.ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mysql-bin.000024', MASTER_LOG_POS=53770618;
On ger.ddnet.tw:
CHANGE MASTER TO MASTER_HOST='ddnet.tw', MASTER_USER='repl', MASTER_PASSWORD='SECRETREPL', MASTER_LOG_FILE='mariadb-bin.000035', MASTER_LOG_POS=0;
START SLAVE;