MySQL Forums
Forum List  »  Router & Proxy

Debugging
Posted by: Adrian Boughey
Date: October 01, 2007 05:38AM

I'm starting mysql-proxy as follows and it seems to work okay.

LUA_PATH="/usr/local/share/mysql-proxy/?.lua" /usr/local/sbin/mysql-proxy --proxy-address=xxx.xxx.xxx.xxx:3307 --proxy-backend-addresses=xxx.xxx.xxx.xxx:3306 --proxy-read-only-backend-addresses=xxx.xxx.xxx.xxx:3306 --pid-file=/var/run/mysql-proxy.pid --proxy-lua-script=/usr/local/share/mysql-proxy/rw-splitting.lua

However, how can I find out which query is being sent where, i.e. to check whether write queries are going to the master and read-only queries are going to the slave(s)?

The reason I ask is that no traffic appears to be going to the slaves. If I do a select * from proxy_config; I get the following:

+----------------------------+-----------------------------------------------+
| option | value |
+----------------------------+-----------------------------------------------+
| admin.address | :4041 |
| proxy.address | xxx.xxx.xxx.xxx:3307 |
| proxy.lua_script | /usr/local/share/mysql-proxy/rw-splitting.lua |
| proxy.backend_addresses[0] | xxx.xxx.xxx.xxx:3306 |
| proxy.fix_bug_25371 | 0 |
| proxy.profiling | 1 |
+----------------------------+-----------------------------------------------+
6 rows in set (0.00 sec)

Should my read-only servers be listed here too?



Edited 2 time(s). Last edit at 10/11/2008 12:16AM by Adrian Boughey.

Options: ReplyQuote


Subject
Views
Written By
Posted
Debugging
3500
October 01, 2007 05:38AM
2156
October 01, 2007 08:59AM
2411
October 01, 2007 09:46AM
2205
October 01, 2007 10:38AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.