This morning I finally found some time to add an init script to the Debian package of mysql-proxy (0.6.1-3 which includes it was just uploaded to unstable, I will try to get a freeze exception for lenny). It is disabled by default, because mysql-proxy is quite useless without a proper configuration. It can be enabled in /etc/default/mysql-proxy, here is an example:
ENABLED="true"
OPTIONS="--proxy-lua-script=/usr/share/mysql-proxy/rw-splitting.lua
--proxy-address=192.168.1.140:3306
--proxy-backend-addresses=192.168.1.20:3306
--proxy-read-only-backend-addresses=192.168.1.23:3306
--proxy-read-only-backend-addresses=192.168.1.24:3306"
In this example the proxy binds to 192.168.1.140 port 3306 and does read/write splitting. Writing statements are directed to 192.168.1.20 port 3306 (master), and reading statements are loadbalanced between 192.168.1.23 port 3306 (first slave) and 192.168.1.24 port 3306 (second slave).