日期:2014-05-16  浏览次数:20790 次

Mysql-proxy v0.8.2测试问题及解决方法
问题1:
在控制台无法输出信息【控制台日志可以统计分析各数据库操作都由哪个数据库服务器执行。】

解决方法:
将/usr/local/mysql_proxy_0.8.2/share/doc/mysql-proxy/rw-splitting.lua中的变isDebug设置为true。


问题2:当进行mysqlslap查询测试时,/usr/local/mysql_proxy_0.8.2/mysql-proxy-0.8.2.log中出现如下日志:

2012-03-08 14:41:27: (message) proxy-plugin.c.1508: connect(192.168.1.11:3306) failed: No route to host. Retrying with different backend. 
2012-03-08 14:41:27: (message) last message repeated 4 times 
2012-03-08 14:41:27: (message) proxy-plugin.c.1508: connect(192.168.1.12:3306) failed: No route to host. Retrying with different backend. 
2012-03-08 14:41:30: (message) last message repeated 2 times 


导致所有的查询都由主服务器db1执行。

分析方法:
[root@dp1 ~]# telnet 192.168.1.11 3306
Trying 192.168.1.11 ...
telnet: connect to address 192.168.1.11: No route to host
telnet: Unable to connect to remote host: No route to host
说明从dp1上根本无法访问db3(192.168.1.11)的mysql数据库端口(3306)。
#db4同样如此。


解决方法:

关闭db3的防火墙
[root@db3 ~]# sudo iptables -F