MySQL双主互备+Keepalived高可用架构介绍(4)

#将测试时关闭的数据库打开,查看日志发现节点进入BACKUP状态
#查看数据库发现故障时候创建的数据库已经同步过来了
#此时又恢复Mysql双主复制的高可用状态了
[root@Mysql-248 keepalived]# /etc/init.d/mysqld start
Starting MySQL.. SUCCESS!
[root@Mysql-248 keepalived]# tail -5 /var/log/messages
Sep  1 08:32:52 Mysql-248 Keepalived_vrrp[71143]: VRRP_Instance(HA_1) removing protocol VIPs.
Sep  1 08:32:52 Mysql-248 Keepalived_vrrp[71143]: VRRP_Instance(HA_1) Now in FAULT state
Sep  1 08:32:52 Mysql-248 Keepalived_healthcheckers[71142]: Netlink reflector reports IP 192.168.175.254 removed
Sep  1 08:51:42 Mysql-248 Keepalived_vrrp[71143]: VRRP_Script(check_mysqld) succeeded
Sep  1 08:51:44 Mysql-248 Keepalived_vrrp[71143]: VRRP_Instance(HA_1) Entering BACKUP STATE
[root@Mysql-248 keepalived]#
[root@Mysql-248 mysql-5.6.30]# mysql -uroot -p'qwe123``' -e 'show databases;'
Warning: Using a password on the command line interface can be insecure.
+--------------------+
| Database          |
+--------------------+
| information_schema |
| cubix              |
| db1                |
| mysql              |
| performance_schema |
+--------------------+

构建高可用集群Keepalived+Haproxy负载均衡 

Keepalived安装与配置

《Keepalived权威指南》下载见

Nginx+Keepalived实现站点高可用 

Nginx+Keepalived实现站点高可用(负载均衡) 

构建高可用集群Keepalived+Haproxy负载均衡

CentOS6.5下 Keepalived高可用服务单实例配置

Keepalived+Nginx实现高可用(HA) 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/902301259b314448ff4e8570030fab2c.html