Re: [Sqlrelay-discussion] sqlrelay redirect question
Brought to you by:
mused
|
From: David M. <dav...@fi...> - 2008-04-17 16:52:25
|
SQL Relay can do this. You need to set up 4 instances of SQL Relay, one to talk to each database. Then you need to set up a 5th instance to "route" queries to the other 4. There's a doc at: http://sqlrelay.sourceforge.net/sqlrelay/router.html that describes this in detail. The section "Provide a Single Point of Access to Multiple Databases" is the section that applies in this case. In that example, one of the db's is mysql and the other is postgresql, but you could just as easily use several mysql databases. The trick is that you need to come up with regular expressions so that the router can look at a query and know which database to send it to by which expression it matches. That could be a long list of regular expressions for each db. Dave On Thu, 2008-04-17 at 11:45 +0100, Peter Clapham wrote: > Dear all, > > Having just started playing with sqlrealy I apologise if this is a daft > Q, I've browsed the archives but I'm not sure I've found how best to > tackle the following problem. > > We have a number of mysql instances running on various hosts and ports. > We would like to be able to rediect queries to a given instance > depending upon the database requested. So in essence we'd have: > > server1 port 3306 database1 > server2 port 3307 database2 > server2 port 5307 database3 > server3 port 5304 database4 > > So user points connection at sqlrelay for a given database connection > this is then (hopefully) redirected transparently to the required server . > > Pointers of best way forward would be much appreciated. > > Many thanks > > Pete > > __________________________________________________ D O T E A S Y - "Join the web hosting revolution!" http://www.doteasy.com |