Bug #30206 MySQL-Proxy: Add ability to use configuration file such as my.cnf
Submitted: 2 Aug 2007 16:47 Modified: 4 Jun 14:00
Reporter: Gerry Reno
Status: Documenting
Category:Proxy Severity:S4 (Feature request)
Version:0.6 OS:Any
Assigned to: Kay Roepke Target Version:
Triage: D5 (Feature request)

[2 Aug 2007 16:47] Gerry Reno
Description:
MySQL-Proxy needs to be able to be driven from a configuration file such as my.cnf as
well as from the command line arguments.

Example:

[mysql-proxy]
proxy-address=n.n.n.n
proxy-port=nnnn
proxy-backend-addresses=n.n.n.n
proxy-backend-addresses=n.n.n.x
proxy-backend-addresses=n.n.n.y
proxy-lua-script=tutorial-keepalive.lua

How to repeat:
--

Suggested fix:
--
[3 Aug 2007 9:09] Valeriy Kravchuk
Thank you for a reasonable feature request.
[9 May 2008 18:45] Tiago Cruz
SNV #369 version it's already working with your own file configuration :)

# cat /etc/mysql-proxy.conf 
[mysql-proxy]
proxy-address = 10.25.0.12:4040
proxy-backend-addresses = 10.25.0.12:3306
proxy-read-only-backend-addresses = 10.25.0.11:3306
proxy-read-only-backend-addresses = 10.25.0.3:3306
proxy-lua-script=/usr/local/share/mysql-proxy/rw-splitting.tiago.lua

But I don't know all parameters that this tool know :)
[4 Jun 14:00] Kay Roepke
MySQL Proxy 0.7 and later implement this type of configuration file.
It can be set with using the --defaults-file option, please see --help-all for all
available options.

The valid keys in the ini file are the long option names listed when using --help-all
(without the leading '--').
Only 'version' and 'default-file' are not valid entries in the defaults file.

Please also refer to
http://blog.zhuzhaoyuan.com/2009/02/using-mysql-proxys-configuration-file/ for an
example.
We will update the official documentation to this effect.