bsp; Connect_Retry: 60
Master_Log_File: mysql-bin.000003
Read_Master_Log_Pos: 251188037
Relay_Log_File: relay-bin.000002
Relay_Log_Pos: 174038
Relay_Master_Log_File: mysql-bin.000003
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
[root@wallet03 ~]# curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | bash
[warning] Found existing file at /etc/yum.repos.d/mariadb.repo. Moving to /etc/yum.repos.d/mariadb.repo.old_1.
[info] Repository file successfully written to /etc/yum.repos.d/mariadb.repo.
[info] Adding trusted package signing keys...
[info] Succeessfully added trusted package signing keys.
[root@wallet03 ~]# yum install -y maxscale latest
[root@wallet03 ~]# maxkeys
Generating .secrets file in /var/lib/maxscale.
[root@king04 ~]# maxpasswd /var/lib/maxscale maxscale
5A23832649A7C09A5011B99813491542
[root@wallet03 ~]# vi /etc/maxscale.cnf
# MaxScale documentation:
# https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22/
# Global parameters
#
# Complete list of configuration options:
# https://mariadb.com/kb/en/mariadb-enterprise/mariadb-maxscale-22-mariadb-maxscale-configuration-usage-scenarios/
#maxscale全局参数
[maxscale]
# 线程数量,默认为1.设置为auto与cpu核数相同
threads=auto
ms_timestamp=1
# Server definitions
#
# Set the address of the server to the network
# address of a MariaDB server.
#后端数据库服务器
[server1]
type=server
address=192.168.1.201
port=3306
protocol=MariaDBBackend
[server2]
type=server
address=192.168.1.202
port=3306
protocol=MariaDBBackend
# Monitor for the servers
#
# This will keep MaxScale aware of the state of the servers.
# MariaDB Monitor documentation:
#
#maxscale的数据库监控模块
[MariaDB-Monitor]
type=monitor
module=mariadbmon
#后端数据库服务器列表
servers=server1 |