-
Notifications
You must be signed in to change notification settings - Fork 25
Description
The basic setup:
two servers, serv1 (ip 1.xxx.xxx.45) and serv2 (ip 10.xxx.xxx.49)
Each server is serving a application who need a database
The databases have different names
To reach:
Cross replication between the two severs with as result the two database present on each server with life updates when data changes.
What is the culprit?
Each server need to be master for the created database on that server and be able to send this to the slave, who actually is also a master for his database
The result on this moment is that one of the two servers is reporting identical ID and can not start the replication
Replication only can be done if the operator use one of the two setups for each server
Those setups are:
Server Master
STOP SLAVE;
CHANGE MASTER TO
MASTER_HOST='10.56.10.49',
MASTER_USER='replusr',
MASTER_PASSWORD='compare',
MASTER_LOG_FILE='mariadb-bin.000001',
MASTER_LOG_POS=1;
START SLAVE;
FLUSH PRIVILEGES;
SHOW SLAVE STATUS\G;
Server Backup
STOP SLAVE;
CHANGE MASTER TO
MASTER_HOST='10.56.10.45',
MASTER_USER='replusr',
MASTER_PASSWORD='compare',
MASTER_LOG_FILE='mariadb-bin.000001',
MASTER_LOG_POS=1;
START SLAVE;
FLUSH PRIVILEGES;
SHOW SLAVE STATUS\G;
Setup information from mariadb 50-server.conf
[mysqld]
server-id = 36 # This ID is changed on the second server
rpl_semi_sync_slave_enabled =1
rpl_semi_sync_master_enabled =1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci
Restarting by sudo systemctl restart maridab.service give each time a other ID, maybe useful to keep that ID the same on each restart and use the information in the setup 50-server.conf
Please make it possible that both servers can replicated to each other after a the power is cycled