InstallMysqlMHAOnRedhat6.3(二)

2015-07-24 09:07:26 · 作者: · 浏览: 1
me passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 19:00:7f:cb:7d:5f:cd:48:3b:08:5a:7f:28:2e:9e:f8 root@zbdba2 The key's randomart image is: +--[ RSA 2048]----+ | ... | | . . | | . o o . | | o B o + +.| | S o = = +| | . o o o | | . . . | | o o | | ..E | +-----------------+ [root@zbdba2 ~]# ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.56.162 root@192.168.56.162's password: Now try logging into the machine, with "ssh 'root@192.168.56.162'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting. [root@zbdba3 ~]# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 9f:2f:5f:0c:fb:dc:f7:f9:4d:b2:de:48:01:ae:51:d1 root@zbdba3 The key's randomart image is: +--[ RSA 2048]----+ | .. | | .E | | o | | o . | | S . o . | | . + + . | | + . = .| | .. = B+| | oo.*.X| +-----------------+ [root@zbdba3 ~]# ssh-copy-id -i /root/.ssh/id_rsa.pub root@192.168.56.161 root@192.168.56.161's password: Now try logging into the machine, with "ssh 'root@192.168.56.161'", and check in: .ssh/authorized_keys to make sure we haven't added extra keys that you weren't expecting. 进行测试: [root@zbdba1 ~]# masterha_check_ssh --conf=/etc/masterha/app1.cnf Tue Feb 10 21:59:19 2015 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping. Tue Feb 10 21:59:19 2015 - [info] Reading application default configuration from /etc/masterha/app1.cnf.. Tue Feb 10 21:59:19 2015 - [info] Reading server configuration from /etc/masterha/app1.cnf.. Tue Feb 10 21:59:19 2015 - [info] Starting SSH connection tests.. Tue Feb 10 21:59:20 2015 - [debug] Tue Feb 10 21:59:19 2015 - [debug] Connecting via SSH from root@192.168.56.161(192.168.56.161:22) to root@192.168.56.162(192.168.56.162:22).. Tue Feb 10 21:59:19 2015 - [debug] ok. Tue Feb 10 21:59:20 2015 - [debug] Tue Feb 10 21:59:20 2015 - [debug] Connecting via SSH from root@192.168.56.162(192.168.56.162:22) to root@192.168.56.161(192.168.56.161:22).. Tue Feb 10 21:59:20 2015 - [debug] ok. Tue Feb 10 21:59:20 2015 - [info] All SSH connection tests passed successfully.
6、开启MHA

?

开启之前进行复制测试:

?

[root@zbdba1 masterha]# masterha_check_repl --conf=/etc/masterha/app1.cnf  
Wed Feb 11 01:20:18 2015 - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Wed Feb 11 01:20:18 2015 - [info] Reading application default configuration from /etc/masterha/app1.cnf..
Wed Feb 11 01:20:18 2015 - [info] Reading server configuration from /etc/masterha/app1.cnf..
Wed Feb 11 01:20:18 2015 - [info] MHA::MasterMonitor version 0.56.
Wed Feb 11 01:20:18 2015 - [info] GTID failover mode = 0
Wed Feb 11 01:20:18 2015 - [info] Dead Servers:
Wed Feb 11 01:20:18 2015 - [info] Alive Servers:
Wed Feb 11 01:20:18 2015 - [info]   192.168.56.161(192.168.56.161:3306)
Wed Feb 11 01:20:18 2015 - [info]   192.168.56.162(192.168.56.162:3306)
Wed Feb 11 01:20:18 2015 - [info] Alive Slaves:
Wed Feb 11 01:20:18 2015 - [info]   192.168.56