MySQL Forums
Forum List  »  Router & Proxy

Problem starting MySQL Proxy
Posted by: Eric Bessette
Date: December 08, 2010 03:19PM

I've just recently installed MySQL Proxy 0.8.1 and now I'm trying to configure it using a "defaults file". However, no matter what I try, MySQL Proxy fails because of a parsing error.

Here is my defaults file, /etc/mysql-proxy.cfg (most values are temporary):
-------------------------------------------------
[mysql-proxy]
no-proxy = false
proxy-backend-addresses = 127.0.0.1:3306
proxy-lua-script = /opt/mysql-proxy/rw-splitting.lua
proxy-read-only-backend-addresses= 127.0.0.1:3306
proxy-skip-profiling = false
basedir = /opt/mysql-proxy/
daemon = true
log-backtrace-on-crash = true
log-file = /var/log/mysql-proxy.log
log-level = debug
log-use-syslog = false
pid-file=/var/run/mysql-proxy.pid
-------------------------------------------------

When I run "mysql-proxy --defaults-file=/etc/mysql-proxy.cfg" using the version above, I get this error:
-------------------------------------------------
2010-12-08 15:58:12: (critical) mysql-proxy-cli.c:326: loading config from '/etc/mysql-proxy.cnf' failed: Key file contains line '[mysql-proxy]' which is not a key-value pair, group, or comment
2010-12-08 15:58:12: (message) Initiating shutdown, requested from mysql-proxy-cli.c:328
2010-12-08 15:58:12: (message) shutting down normally, exit code is: 1
-------------------------------------------------

If I add any comments like "# This is a comment", then I get this error:
-------------------------------------------------
2010-12-08 14:46:17: (critical) mysql-proxy-cli.c:326: loading config from '/etc/mysql-proxy.cnf' failed: Key file contains line '# /etc/mysql-proxy.cnf' which is not a key-value pair, group, or comment
2010-12-08 14:46:17: (message) Initiating shutdown, requested from mysql-proxy-cli.c:328
2010-12-08 14:46:17: (message) shutting down normally, exit code is: 1
-------------------------------------------------

If I remove the "[mysql-proxy]" line, then it errors out saying the group is missing.

Any ideas what's going on here? I'm using the binary installation on CentOS.

Thanks,
Eric

Options: ReplyQuote


Subject
Views
Written By
Posted
Problem starting MySQL Proxy
115747
December 08, 2010 03:19PM
2421
December 13, 2010 11:12AM


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.