Bug #30206 MySQL-Proxy: Add ability to use configuration file such as my.cnf
Submitted: 2 Aug 2007 14:47 Modified: 20 Jan 2010 15:51
Reporter: Gerry Reno Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy Severity:S4 (Feature request)
Version:0.6 OS:Any
Assigned to: Kay Roepke CPU Architecture:Any

[2 Aug 2007 14: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 7:09] Valeriy Kravchuk
Thank you for a reasonable feature request.
[9 May 2008 16: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 2009 12: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.
[20 Jan 2010 15:51] MC Brown
The documentation has been updated with info on using a config file. 
An entry has been added to the 0.7.0 changelog.