If you need to combine two scripts with MySQL
Proxy you have three choices.
- You can manually rewrite the two scripts (good luck!)
- you can use the load-multi module to load scripts on demand;
- or you can use the proxy chaining technique.
To chain two proxies, you need to start one Proxy with the first
Lua script, pointing at the real backend, listening to a
non-standard port. Then you start the second Proxy with the
second Lua script, having the first proxy as a backend, and
listening to the standard proxy port.
It's a difficult and error prone procedure. You would forget
about it, unless there were an easy workaround. And indeed you
can have such a workaround. Just use the …