[mysql-proxy] daemon = true proxy-address = 10.10.10.70:4040 proxy-backend-addresses = 10.10.10.224:3306 proxy-backend-addresses = 10.10.10.41:3306 log-file = /usr/local/mysql-proxy/mysql-proxy.log log-level = debug pid-file=/usr/local/mysql-proxy//mysql-proxy.pid bt its only work for 1 backend server , when i gave such options from command line both the backend servers work fine with proxy bt now with mysql-proxy.cnf it works only for second backendserver.

Asked by sunil

Following is my mysql-proxy.cnf
[mysql-proxy]
daemon = true
proxy-address = 10.10.10.70:4040
proxy-backend-addresses = 10.10.10.224:3306
proxy-backend-addresses = 10.10.10.41:3306
log-file = /usr/local/mysql-proxy/mysql-proxy.log
log-level = debug
pid-file=/usr/local/mysql-proxy//mysql-proxy.pid

then i set it as a --defaults-file

bt its only work for 1 backend server , when i gave such options from command line both the backend servers work fine with proxy bt now with mysql-proxy.cnf it works only for second backendserver and if i write proxy-backend-addresses to the loop back its not working.

Please help me,
Thanks in advance

Question information

Language:
English Edit question
Status:
Solved
For:
MySQL Proxy Edit question
Assignee:
No assignee Edit question
Solved by:
Jan Kneschke
Solved:
Last query:
Last reply:
Revision history for this message
Best Jan Kneschke (jan-kneschke) said :
#1

The config-file and the commandline options are slightly different when it comes to multiple values:

$ mysql-proxy \
  --proxy-backend-addresses = 10.10.10.224:3306 \
  --proxy-backend-addresses = 10.10.10.41:3306

becomes:

[mysql-proxy]
proxy-backend-addresses=10.10.10.224:3306,10.10.10.41:3306

Revision history for this message
sunil (me-sunil123) said :
#2

thanks Jan Kneschke, it works.

Revision history for this message
sunil (me-sunil123) said :
#3

thanks Jan Kneschke, it works. now i want such mysql-proxy.cnf in a mysqld-proxy service.

1) in short i want service through which this mysql-proxy can be start and stop
   just like /etc/init.d/mysqld start|stop

2)and i want to keep in such a file that if my o.s. got restarted mysql-proxy starts automatically

Please help me for this also,
Thanks in advance

Revision history for this message
sunil (me-sunil123) said :
#4

problem solved

Revision history for this message
sunil (me-sunil123) said :
#5

Thanks Jan Kneschke, that solved my question.