P? ? |? ? ? 1 |? ? ? ? 0 |? ? ? 0 | server1 | No? | No? |? NULL |? ? NULL |? NULL |? ? NULL |? NULL |? ? NULL | NULL | NULL |? ? NULL |
+------+--------------------+-----------+--------+--------+----------+--------+---------+------+------+-------+---------+-------+---------+-------+---------+------+------+---------+

5.分别在三台mariadb服务器上抓包:
master:
tcpdump -i eth0 -nn -XX ip dst 192.168.19.66 and tcp dst port 3306
slave1:
tcpdump -i eth0 -nn -XX ip dst 192.168.19.74 and tcp dst port 3306
slave2:
tcpdump -i eth0 -nn -XX ip dst 192.168.19.76 and tcp dst port 3306
6.在oneproxy上进行数据库创建及读取:
mysql -utest -predhat -h192.168.19.79? ? ? //连接到oneproxy
数据库命令这里不再写出,大家可以从图片可以看出,所有写操作都在master上进行,读操作被负载均衡至slave上。






至此,实验成功,谢谢!