Re: Selecting backend based on the user connecting
Well, there does seem to be one problem with this.
The connections in the pool stay alive so once a connection has been opened to each backend I can send a query to a backend of my choice, but it doesn't always work since the client sending the connection may not have the proper permissions for the client that is currently using it.
What I have setup looks like this;
I have two backend servers BE1 & BE2.
I have two users U1 and U2 - these user accounts exist on both backends.
On BE1 I have DB1 that U1 has access to and on BE2 I have DB2 that U2 has access to.
When U1 connects I send all his queries over a connection to BE1 since that's where his database lives and I send all queries from U2 to BE2.
The problem is that if the connection to BE1 that I'm reusing from the pool was originally opened by U2, then I get permission denied errors since U2 that authed the connection originally does not have any access to U1's database.
ERROR 1044 (42000): Access denied for user 'U2'@'localhost' to database 'DB1'
As far as I can see this makes the proxy pretty useless for my purposes.
I would suspect this would also be a problem for R/W splitting if one user sends queries over a connection authed by a different user.
How can I overcome this?
Subject
Views
Written By
Posted
3569
August 13, 2007 03:42AM
2789
August 13, 2007 04:05AM
2609
August 13, 2007 04:11AM
2517
August 13, 2007 04:27AM
2534
August 13, 2007 05:29AM
2491
August 13, 2007 06:17AM
2681
August 20, 2007 05:47AM
2625
August 20, 2007 09:06AM
Re: Selecting backend based on the user connecting
2650
August 22, 2007 07:45AM
2560
August 13, 2007 04:16AM
2555
August 13, 2007 04:25AM
2359
August 13, 2007 05:57AM
2442
August 13, 2007 06:20AM
2615
August 13, 2007 09:03AM
2366
October 11, 2007 02:31AM
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.