MySQL Forums
Forum List  »  Router & Proxy

Switching backend depending on the default_db
Posted by: Rodion Smirnov
Date: October 03, 2007 07:16AM

I've run into a problem:
Let's say there two MySQL boxes with different set of databases.
I wish to set up MySQL Proxy as a unified point which users will use to connect to their databases.
I've tried to create a script with implemented function read_auth( auth )
something like following
if auth.default_db ~= "" then
if auth.default_db == "db1" then
proxy.connection.backend_ndx = 1
elseif auth.default_db == "db2" then
proxy.connection.backend_ndx = 2
end
end
But for some reason it doesn't do the trick.
Could anyone give me idea of what I'm doing wrong. Does the backend change is supported in the read_auth.

Options: ReplyQuote


Subject
Views
Written By
Posted
Switching backend depending on the default_db
4191
October 03, 2007 07:16AM


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.