MySQL Forums
Forum List  »  Router & Proxy

R/W Splitting don't work
Posted by: Ku Dak
Date: March 20, 2012 10:06PM

Hi every one,

To day I test MySQL proxy with R/W Splitting script, but it don't work exactly. "SELECT" query run with master, don't run with slaver. Follow is log debug:


current backend = 0
client default db = abc
client username = root
query = SELECT count(*) as count FROM Persons WHERE P_Id
sending to backend : 192.168.1.1:3306
is_slave : false
server default db: abc
server username : root
in_trans : false
in_calc_found : false
COM_QUERY : true

My command:
mysql-proxy --proxy-backend-addresses=192.168.1.1:3306 --proxy-read-only-backend-addresses=192.168.1.2:3306 --proxy-lua-script=/usr/local/mysql-proxy/script/rw-splitting.lua

If I change back to backend is 192.168.1.2 and 192.168.1.1 read-only-backen the situation is still like that, "Select" query only runs on 192.168.1.2 .So I do not think problem is the connection.

Who can give me ideas? Thanks a lot.



Edited 1 time(s). Last edit at 03/20/2012 10:20PM by Ku Dak.

Options: ReplyQuote


Subject
Views
Written By
Posted
R/W Splitting don't work
3680
March 20, 2012 10:06PM
2114
March 20, 2012 11:25PM
2151
March 20, 2012 11:48PM
1936
March 22, 2012 02:41AM


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.