MySQL-Proxy Round Robin

Hi All,

I have Mysql-Proxy Server (IP: and 03 DB servers, in there:

- DB Server 1: Read & Write
- DB Server 2: Read
- DB Server 3: Read

I checked the DB Server 1 (Read & Write OK) & DB Server 3 (Read OK)
And DB Server 2 never read.

#vi /etc/mysql-proxy.cnf

proxy-address=      #IP, port of proxy server
proxy-backend-addresses=       #IP, port of DB server for writting
proxy-read-only-backend-addresses=      #IP, port of DB server for read
proxy-read-only-backend-addresses=       #IP, port of DB server for read
proxy-lua-script=/usr/local/mysql-proxy/lua/rw-splitting.lua # script read-write
admin-lua-script=/usr/local/mysql-proxy/lua/admin-sql.lua # script management
log-file=/usr/local/mysql-proxy/log/mysql-proxy.log       #file log

Where is the parameter for round robin that I can declare in this configuration above? Is it right?

Please give me your advices about this issue.

Thanks in advance,
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

SandyConnect With a Mentor Commented:
Was this resolved ?

SandyConnect With a Mentor Commented:
--proxy-backend-addresses=host:port, -b host:port

The host name (or IP address) and port of the MySQL server to connect to. You can specify multiple backend servers by supplying multiple options. Clients are connected to each backend server in round-robin fashion. For example, if you specify two servers A and B, the first client connection will go to server A; the second client connection to server B and the third client connection to server A.

When using this option on the command line, you can specify the option and the server multiple times to specify multiple backends. For example:

shell> mysql-proxy --proxy-backend-addresses --proxy-backend-addresses

When using the option within the configuration file, you should separate multiple servers by commas. The equivalent of the preceding example would be:

it's by default round-robin no need to define parameter. Your configuration is perfectly fine.

ldvhaiAuthor Commented:
Ok, Thanks.
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

ldvhaiAuthor Commented:
I've requested that this question be closed as follows:

Accepted answer: 0 points for ldvhai's comment #a40129118

for the following reason:

OK, Thks,
ldvhaiAuthor Commented:
Yes, solved, thks.
ldvhaiAuthor Commented:
Thks for your help.
All Courses

From novice to tech pro — start learning today.