1. down
https://mariadb.com/downloads/#mariadb_platform-mariadb_maxscale
(1) install
sudo yum localinstall maxscale-2.3.4-1.centos.7.x86_64.rpm
(2) start
sudo systemctl start maxscale.service
2. setup
[maxscale]
libdir=/usr/lib64/maxscale
(0) monitor user
(mariaDB - Master)
create user maxscale_monitor@'192.168.0.%' identified by "qaz1xsw2";
grant replication slave, replication client on *.* to maxscale_monitor@'192.168.0.%';
(1) failover
[server1]
type=server
address=192.168.121.51
port=
protocol=MariaDBBackend [server2]
... [server3]
... [MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=server1,server2,server3,server4
auto_failover=true
auto_rejoin=true
...
Reference:
2. 《Automatic Failover With MariaDB Monitor》
3. 《Read/Write Splitting with MariaDB MaxScale》