MariaDB MaxScale

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

/etc/maxscale.cnf

[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:

1. 《maxscale-23-tutorials

2. 《Automatic Failover With MariaDB Monitor

3. 《Read/Write Splitting with MariaDB MaxScale

4. 《Simple Sharding with Two Servers

5. 《MariaDB MaxScale HA with Lsyncd

上一篇:iReport —— 使用 JavaBean 作为数据源


下一篇:JavaScript 高级程序设计(第3版)笔记——chapter5:引用类型