标签:mysql5.7双机热备 mysql5.7+keepalived1
1.规划系统 | IP地址 | 软件包及安装方式 | VIP |
---|---|---|---|
CentOS 7.3.1611 | 10.3.3.240<master> | mysql5.7<rpm>; keepalived-1.3.5-6<yum> | 10.3.3.99 |
CentOS 7.3.1611 | 10.3.3.208<slave > | mysql5.7<rpm> ;keepalived-1.3.5-6<yum> | 10.3.3.99 |
2.安装准备
mysql主从或者mysql双主,自行搭建这里不再赘述。
注:mysql与keepalived最好在同一台主机。mysql主从开启远程用户
3.keepalived安装
yum -y install keepalived
4.master<10.3.3.240>配置keepalived
配置文件中的nopreempt:是保证keepalived出现故障恢复后频繁切换。
5.slave<10.3.3.208>配置keepalived
6.启动keepalived:
systemctl start keepalived
7.查看VIP地址:
8.关闭master的keepalived:
systemctl stop keepalived
9.测试连接:
mysql5.7+keepalived1.3.5搭建热备服务器
标签:mysql5.7双机热备 mysql5.7+keepalived1
原文地址:http://blog.51cto.com/1054054/2115751