Consul, ProxySQL and MySQL MHA(mysql 读写分离,高可用)
背景: mysql 官方目前没有提供比较成熟,稳定的高可用的方案,使得Mysql的高可用方案相对较少,一般都只有简单的主从,今天和大家分享一个Consul, ProxySQL and MySQL MHA架构的高可用方案: 架构特性: 1,高可用 2,读写分离,查询路由 3,sql过滤等功能 Installation of Consul: Firstly, we’ll need to install the required packages, download the Consul archive and perform the initial configuration. We’ll need to perform the same installation on each of the nodes (i.e., appserver, mysql1 and mysql2). Install pre-requisite packages: sudo yum -y install wget unzip bind-utils dnsmasq Install Consul: sudo useradd consul sudo mkdir -p /opt/consul /etc/consul.d sudo touch /var/log/consul.log /etc/consul.d