Maxscale实现Mysql读写分离
Maxscale实现Mysql读写分离: 注: 1、该工具只有一主,如主出了问题整体会有10s左右不可用(即使从会自动切为主)。 2、读设置的2台实际只生效了1台。 下载地址: https://mariadb.com/downloads/#mariadb_platform-mariadb_maxscale rpm -i maxscale-2.4.9-1.centos.7.x86_64.rpm vi /etc/maxscale.cnf [maxscale] threads=auto [server1] type=server address=10.0.1.3 port=3306 protocol=MariaDBBackend [server2] type=server address=10.0.1.4 port=3306 protocol=MariaDBBackend [server3] type=server address=10.0.1.5 port=3306 protocol=MariaDBBackend [MariaDB-Monitor] type=monitor module=mariadbmon servers=server1,server2,server3 user=aa password=xxxxxx monitor_interval=2000 [Select