I used keepalived+proxy+mysql.
Master:192.168.10.1
Slave:192.168.10.2
Master-VIP:192.168.10.100
When I use CHANGE MASTER TO MASTER_HOST='192.168.10.1'...
, replication is OK, when I use CHANGE MASTER TO MASTER_HOST='192.168.10.100'...
, Slave I/O can't connect to master, and I got error like this:
150522 15:21:50 [ERROR] Slave I/O: error connecting to master 'repl@192.168.10.100:3307' - retry-time: 60 retries: 86400, Error_code: 2003
150522 15:21:50 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.000001' at position 107, relay log './mmm-relay-bin.000001' position: 4
In slave, I use mysql -urepl -pslavepass -h192.168.10.100 -P3307
, I can login the db, why does Slave I/O can't connect to master?