3、创建一个测试书库库查看MySQLmaster进程,显示已经发送二进制日志给salve
mysql> create database reliacatedb; mysql> show processlist\G *************************** 1. row *************************** Id: 1 User: root Host: localhost db: NULL Command: Query Time: 0 State: init Info: show processlist *************************** 2. row *************************** Id: 3 User: dbsync Host: slave:33608 db: NULL Command: Binlog Dump GTID Time: 259 State: Master has sent all binlog to slave; waiting for binlog to be updated Info: NULL二、amoeba节点安装配置
1、配置Java环境
2、安装ameoba
https://sourceforge.net/projects/amoeba/files/Amoeba%20for%20mysql/
3、修改ameoba配置文件
amoeba前端访问配置
4、amoeba后端代理配置
# vim /usr/local/amoeba-2.2.0/conf/dbServers.xml <property name="user">root</property> # 默认连接mysql server的用户 <property name="password">pass</property> # 默认连接mysql server的密码,以上两项如不在下文中的dbserver中单独定义,则直接继承此处定义 <dbServer name="master" parent="abstractServer"> <factoryConfig> <property name="ipAddress">192.168.0.172</property> </factoryConfig> </dbServer> <dbServer name="slave" parent="abstractServer"> <factoryConfig> <property name="ipAddress">192.168.0.173</property> </factoryConfig> </dbServer> <dbServer name="multiPool" virtual="true"> #服务组,轮询策略 <poolConfig class="com.meidusa.amoeba.server.MultipleServerPool"> <!-- Load balancing strategy: 1=ROUNDROBIN , 2=WEIGHTBASED , 3=HA--> <property name="loadbalance">1</property> <!-- Separated by commas,such as: server1,server2,server1 --> <property name="poolNames">master,slave,slave,slave</property> </poolConfig> </dbServer>