mysql proxy and admin problem
Posted by:
hogan yu
Date: April 09, 2008 03:05AM
hi, everyone:
I config the mysql-proxy according the spec for the r/w as follows:
LUA_PATH="/usr/local/share/mysql-proxy/?.lua" mysql-proxy --proxy-lua-script=/usr/local/share/mysql-proxy/rw-splitting.lua --proxy-backend-addresses=192.168.1.12:3306 --proxy-read-only-backend-addresses=192.168.1.12:3307
But when i access it by admin as follows:
mysql -uroot -p --port=4040 -h 192.168.1.12
and select the proxy_config by
select * from proxy_config;
We get the list as follows:
mysql> select * from proxy_connections;
+------+--------+-------+------+
| id | type | state | db |
+------+--------+-------+------+
| 0 | server | 0 | |
| 1 | proxy | 0 | |
| 2 | server | 10 | |
+------+--------+-------+------+
3 rows in set (0.00 sec)
mysql> select * from proxy_config;
+----------------------------+-----------------------------------------------+
| option | value |
+----------------------------+-----------------------------------------------+
| admin.address | :4041 |
| proxy.address | :4040 |
| proxy.lua_script | /usr/local/share/mysql-proxy/rw-splitting.lua |
| proxy.backend_addresses[0] | 192.168.1.12:3306 |
| proxy.fix_bug_25371 | 0 |
| proxy.profiling | 1 |
+----------------------------+-----------------------------------------------+
There only have one server to list, where can i found the readonly server (:3307) ?
And I test the script, it send all the select an update to the 192.168.1.12:3306. and how to define the max connection numbers for each master and slave server.
Great Thanks!
Hogan
Subject
Views
Written By
Posted
mysql proxy and admin problem
3594
April 09, 2008 03:05AM
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.