- 论坛徽章:
- 0
|
mysql-proxy 一主两从,查询请求无法分发到DB3,所有请求都被转发到DB2
DB1=192.168.1.200
DB2=192.168.1.210
DB3=192.168.1.211
配置文件如下:
admin-username=root
admin-password=123456
admin-lua-script=/usr/local/mysql-proxy/lib/admin.lua
proxy-backend-addresses=192.168.1.200:3306
proxy-read-only-backend-addresses=192.168.1.210:3306,192.168.1.211:3306
proxy-lua-script=/usr/local/mysql-proxy/rw-splitting.lua
log-file=/var/log/mysql-proxy.log
log-level=debug
keepalive=true
daemon=true
###################################################
修改成这样也不行
proxy-read-only-backend-addresses=192.168.1.210:3306
proxy-read-only-backend-addresses=192.168.1.211:3306
###################################################
日志也显示启动成功
2012-11-02 12:59:04: (message) shutting down normally, exit code is: 0
2012-11-02 12:59:06: (message) chassis-unix-daemon.c:136: [angel] we try to keep PID=17933 alive
2012-11-02 12:59:06: (debug) chassis-unix-daemon.c:157: waiting for 17933
2012-11-02 12:59:06: (debug) chassis-unix-daemon.c:121: we are the child: 17933
2012-11-02 12:59:06: (message) mysql-proxy 0.8.2 started
2012-11-02 12:59:06: (debug) max open file-descriptors = 32768
2012-11-02 12:59:06: (message) proxy listening on port 192.168.1.220:4040
2012-11-02 12:59:06: (message) added read/write backend: 192.168.1.200:3306
2012-11-02 12:59:06: (message) added read-only backend: 192.168.1.210:3306
2012-11-02 12:59:06: (message) added read-only backend: 192.168.1.211:3306 |
|