Open GoogleCodeExporter opened 8 years ago
The initial mha config is given below. db01 is master. db02 and db03 are its
slaves.
[server default]
#log_level=debug
manager_log=/var/log/masterha/mysqlcluster.log
manager_workdir=/var/log/masterha/
master_ip_failover_script=/etc/mha/master_ip_failover
password=232aAA
ping_interval=3
remote_workdir=/var/log/masterha
ssh_user=ssh_user
user=repl
[server1]
hostname=db01
[server2]
hostname=db02
[server3]
hostname=db03
After failover happens for the first time, mha config will be shown as given
below. db02 will become master and db03 its slave
[server default]
#log_level=debug
manager_log=/var/log/masterha/mysqlcluster.log
manager_workdir=/var/log/masterha/
master_ip_failover_script=/etc/mha/master_ip_failover
password=232aAA
ping_interval=3
remote_workdir=/var/log/masterha
ssh_user=ssh_user
user=repl
[server2]
hostname=db02
[server3]
hostname=db03
There should be no more fail over happens because there is only one slave db03.
Original comment by khanomai...@gmail.com
on 18 Feb 2015 at 2:58
If you keep "[server1]" entry, after failover MHA does not start because
server1 does not exist, which means failover does not happen. Does not meet
your requirement?
Original comment by Yoshinor...@gmail.com
on 19 Feb 2015 at 6:41
Many thanks for the reply. Yes for the moment that would work. I had one more
question not directly to mha but you probably have encountered it many times.
If the previous master was down for one hour and I want to add it as a slave of
the new master. Data until the failover in the new master and previous master
would be the same (More than 80% of our database activity is read only). What
would be the quickest way to do it without stopping/locking the new master.
Should I use rsync from the new master. I am using mha 0.56 version with gtid
support now.
Original comment by khanomai...@gmail.com
on 20 Feb 2015 at 12:14
Original issue reported on code.google.com by
khanomai...@gmail.com
on 18 Feb 2015 at 2:40