SERVER A config file:
server-id=1
log-bin="mysql-bin"
binlog-do-db=replicatietest
replicate-do-db=replicatietest
relay-log="mysql-relay-log"
auto-increment-increment = 2
auto-increment-offset = 1
command:
CREATE USER 'replicator'@'%' IDENTIFIED BY 'Slave123';
GRANT REPLICATION SLAVE ON *.* TO 'replicator'@'%' IDENTIFIED BY 'Slave123';
SHOW MASTER STATUS;
--> mysql-bin.000003 397 replicatietest
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST = 'Server A IP Address', MASTER_USER = 'replicator', MASTER_PASSWORD = 'Slave123', MASTER_LOG_FILE = 'mysql-bin.000003', MASTER_LOG_POS = 397;
START SLAVE;
--> OK
Server B config file:
server-id=2
log-bin="mysql-bin"
binlog-do-db=replicatietest
replicate-do-db=replicatietest
relay-log="mysql-relay-log"
auto-increment-increment = 2
auto-increment-offset = 2
commands
CREATE USER 'replicator'@'%' IDENTIFIED BY 'Slave123';
GRANT REPLICATION SLAVE ON *.* TO 'replicator'@'%' IDENTIFIED BY 'Slave123';
SHOW MASTER STATUS;
--> mysql-bin.000001 154 replicatietest
STOP SLAVE;
CHANGE MASTER TO MASTER_HOST = 'Server B IP Address', MASTER_USER = 'replicator', MASTER_PASSWORD = 'Slave123', MASTER_LOG_FILE = 'mysql-bin.000001', MASTER_LOG_POS = 154;
START SLAVE;
--> OK
I can ping the ip adresses. But when I change something in Server A in the replicatietest, I don't see anything in server B.
Server A and B have both the scheme replicatietest. I think the log-bin and relay-log aren't right.
Ps: I'm working on 2 windows desktops with workbench mysql.