https://mariadb.com/downloads/#mariadb_platform-mariadb_maxscale
https://dlm.mariadb.com/browse/mariadbmaxscale/130/994/
maxscale-2.5.10.rhel.7.tar.gz
sudo groupadd maxscale && sudo useradd -g maxscale maxscale
sudo tar -xzvf maxscale-
cd /usr/local2.5.10.rhel.7.tar.gz
sudo mv /soft/maxscale-2.5.10.rhel.7 /usr/local/maxscale
cd /usr/local/maxscale
sudo chown -R maxscale var
sudo mkdir /var/log/maxscale
sudo mkdir /var/lib/maxscale
sudo mkdir /var/run/maxscale
sudo mkdir /var/cache/maxscale
sudo chown maxscale /var/log/maxscale
sudo chown maxscale /var/lib/maxscale
sudo chown maxscale /var/run/maxscale
sudo chown maxscale /var/cache/maxscale
sudo chown -R maxscale /usr/local/maxscale
sudo /usr/local/maxscale/bin/maxscale --user=maxscale --basedir=/usr/local/maxscale -d
bin/maxscale -d --basedir=.
sudo /usr/local/maxscale/bin/maxscale –config=/usr/local/maxscale/etc/maxscale.cnf --user=maxscale
-- maxscale:
grant replication slave ,replication client on . to scalemon@'%' identified by '123456m';
创建路由用户
grant select on mysql.* to maxscale@'%' identified by '123456m';
[maxscale]
threads=auto
log_warning=1
log_notice=1
logdir= /data/my_day/maxscale_log
admin_port=8002
[SplitterService]
type=service
router=readwritesplit
servers=db1,db2,db3
user=maxscale_user
password=XXXXXX
enable_root_user=1
[SplitterListener]
type=listener
service=SplitterService
protocol=MySQLClient
port=4007
[db1]
type=server
address=0.0.0.7
port=13307
protocol=MariaDBClient
[db2]
type=server
address=0.0.0.8
port=13307
protocol=MariaDBClient
[db3]
type=server
address=0.0.0.9
port=13307
protocol=MariaDBClient
[MariaDB-Monitor]
type=monitor
module=mariadbmon
servers=db1,db2,db3
user=maxscale_mon
password=XXXXXX
monitor_interval=2000ms
replication_user=repl
replication_password=XXXXXX
auto_failover=true
auto_rejoin=true
failcount=3
failover_timeout=90
switchover_timeout=90
verify_master_failure=true
master_failure_timeout=10
detect_stale_master=true
网友评论