rw splitting sends selects to master untill i lock tables on master or master is down, then selects will run on slave as it should.
I have two databases(5.5.6). One master and one slave. the slave is read only.
I got mysql-proxy 0.8.1 and i start it like this:
[mysql-proxy]
LUA_PATH=
proxy-lua-
proxy-backend-
proxy-read-
admin-username=
admin-password=xxx
log-file=
log-level=debug
admin-lua-
daemon=true
I access the proxy like:
mysql -uadmin -pxxx -hmy_proxy_
and it works BUT all querys will run agains the master untill i lock the tables or take down the master (and after that start it again). Then all selects will go agains the slave. Even new sessions selects will run agains the slave. And the inserts/updates will run agains the master.
If i dont miss anything it should work like, all SELECTS against the read only slave and all INSERTS/UPDATES against the master?
Cheers
Patrik
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- MySQL Proxy Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- patlik lindqvist
- Solved:
- Last query:
- Last reply: