Switching backend depending on the default_db
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.
Subject
Views
Written By
Posted
Switching backend depending on the default_db
4300
October 03, 2007 07:16AM
2395
October 08, 2007 09:44AM
2484
October 08, 2007 12:43PM
2437
October 08, 2007 07:40PM
2548
October 09, 2007 02:41PM
2892
October 15, 2007 03:37PM
2397
October 22, 2007 04:43AM
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.