MySQL Forums
Forum List  »  Router & Proxy

Switching DB Servers based on Query
Posted by: R P
Date: April 14, 2011 12:03PM


I am trying to get MySQL Proxy to connect to 2 machines, say Server A and Server B.
If a query is querying a given schema, say X, it will go to Server B - otherwise, it will go to server A.

From reading other tutorials on switching the connection, I get that I have to set proxy.connection.backend_ndx to 1 or 2 depending on which server I want the query to go to, but that doesn't seem to work.
What is happening now is that I am connecting to one server, and the only time that it will switch to the other server is if I bring the db down on the first server.

This will all be done in a controlled environment - I can ignore cases where users execute "use X" or any type of transaction handling.

What step am I missing?


Options: ReplyQuote

Written By
Switching DB Servers based on Query
April 14, 2011 12:03PM

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.