yoshinorim / mha4mysql-manager

Development tree of Master High Availability Manager and tools for MySQL (MHA), Manager part
http://code.google.com/p/mysql-master-ha/
GNU General Public License v2.0
1.46k stars 501 forks source link

端口非3307的mysql在线切换不成功 #109

Open dcongee opened 6 years ago

dcongee commented 6 years ago

https://github.com/yoshinorim/mha4mysql-manager/blob/abe11f9abb74bc5886012ff5cc9e209fb9b093c1/lib/MHA/ServerManager.pm#L1500

Tue May 29 14:52:57 2018 - [info] Executing FLUSH NO_WRITE_TO_BINLOG TABLES. This may take long time.. Tue May 29 14:52:57 2018 - [info] ok. Tue May 29 14:52:57 2018 - [info] Checking MHA is not monitoring or doing failover.. Tue May 29 14:52:57 2018 - [info] Checking replication health on 172.16.0.42.. Tue May 29 14:52:57 2018 - [info] ok. Tue May 29 14:52:57 2018 - [info] Checking replication health on 172.16.0.43.. Tue May 29 14:52:57 2018 - [info] ok. Tue May 29 14:52:57 2018 - [info] Searching new master from slaves.. Tue May 29 14:52:57 2018 - [info] Candidate masters from the configuration file: Tue May 29 14:52:57 2018 - [info] Non-candidate masters: Tue May 29 14:52:57 2018 - [info] From: 172.16.0.41(172.16.0.41:3307) (current master) +--172.16.0.42(172.16.0.42:3307) +--172.16.0.43(172.16.0.43:3307)

To: 172.16.0.42(172.16.0.42:3307) (new master) +--172.16.0.43(172.16.0.43:3307)

Starting master switch from 172.16.0.41(172.16.0.41:3307) to 172.16.0.42(172.16.0.42:3307)? (yes/NO): no Continue? (yes/NO): yes Enter new master host name: 172.16.0.43 Tue May 29 14:53:07 2018 - [error][/usr/share/perl5/vendor_perl/MHA/ManagerUtil.pm, ln177] Got ERROR: New server not found!

kobehaha commented 6 years ago

可以配置端口的.

hostname=172.17.2.201 port=3306

具体可以看下wiki