I am trying to use "rw-splitting.lua" script with a replication master - 1 slave solution.
Currently I'm running MySQL Proxy with these options:
LUA_PATH="/usr/local/mysql-proxy/share/mysql-proxy/?.lua" \
/usr/local/mysql-proxy/sbin/mysql-proxy \
--proxy-address=:4040 \
--proxy-backend-addresses=:3306 \
--proxy-read-only-backend-addresses=192.168.xx.xx:3307 \
--proxy-lua-script=/usr/local/mysql-proxy/share/mysql-proxy/rw-splitting.lua \
--pid-file=/var/run/mysqld/mysql-proxy.pid
At first I tried --proxy-read-only-backend-addresses=192.168.xx.xx:3306 and wasn't working.
Next try was --proxy-read-only-backend-addresses=:3307 (as of example in page
http://jan.kneschke.de/projects/mysql/mysql-proxy-more-r-w-splitting) with rinetd from 127.0.0.1:3307 to 192.168.xx.xx:3306
I'm able to connect with mysql --port 3307 through rinetd, so it is actually working...
But mysql-proxy won't connect to that:
mysql> SELECT * FROM proxy_config;
+----------------------------+-----------------------------------------------------------+
| option | value |
+----------------------------+-----------------------------------------------------------+
| admin.address | :4041 |
| proxy.address | :4040 |
| proxy.lua_script | /usr/local/mysql-proxy/share/mysql-proxy/rw-splitting.lua |
| proxy.backend_addresses[0] | :3306 |
| proxy.fix_bug_25371 | 0 |
| proxy.profiling | 1 |
+----------------------------+-----------------------------------------------------------+
6 rows in set (0.00 sec)
Any suggestion ?
Thank you
PS:
I am running mysql 5.1.22-rc compiled with ICC and mysql-proxy 0.6.0
CC=icc \
CXX=icpc \
CFLAGS="-march=nocona -fast -unroll2 -ip -mp -no-gcc -restrict" \
CXXFLAGS="-march=nocona -fast -unroll2 -ip -mp -no-gcc -restrict" \
./configure --prefix=/usr/local/mysql-5.1.22-rc_icc \
--disable-shared \
--enable-assembler \
--enable-local-infile \
--enable-thread-safe-client \
--with-charset=latin1 \
--with-extra-charsets=utf8 \
--with-client-ldflags=-all-static \
--with-mysqld-ldflags=-all-static \
--with-unix-socket-path=/var/run/mysqld/mysqld-5.1.22-rc_icc.sock \
--with-innodb \
--with-partition
./configure --prefix=/usr/local/mysql-proxy \
--with-mysql=/usr/local/mysql-5.1.22-rc_icc/bin/mysql_config \
--with-lua
Edited 3 time(s). Last edit at 12/03/2007 12:26PM by Fabrizio Bottino.