Re: [Sqlrelay-discussion] sqlrelay redirect question
Brought to you by:
mused
|
From: Peter C. <pc...@sa...> - 2008-04-18 08:40:59
|
Hello David,
Many thanks for your reply, much appreciated. For real world usage I
think I may be able to make a few generic rules for filtering as they
will be database revision based (fingers crossed there :-) )
I had a play with the router example but hit the following errors. Ones
of particular interest were the unknown dbase router and it didn't like
an instance section without a router entry. I've attached a v.
simplistic version of the config and output below (apologies if I'm
missing something obvious here). On the plus side the connection pooling
is working elsewhere like a charm (so many thanks there :-) )
sqlrelay version:
0.37.1-3.1 (with Debian Etch)
config file:
see attached
output:
Starting SQL Relay ... /etc/sqlrelay/sqlrelay.conf:14: element instance:
validity error : Element instance content does not follow the DTD,
expecting (users , connections , router), got (users connections )
</instance>
^
/etc/sqlrelay/sqlrelay.conf:24: element instance: validity error :
Element instance content does not follow the DTD, expecting (users ,
connections , router), got (users connections )
</instance>
^
/etc/sqlrelay/sqlrelay.conf:27: element instance: validity error : Value
"router" for attribute dbase of instance is not among the enumerated set
tringbindvaluelength="4000" maxlobbindvaluelength="71680"
idleclienttimeout="-1"
^
/etc/sqlrelay/sqlrelay.conf:40: parser error : expected '>'
</instances>
^
SQL Relay not started/etc/sqlrelay/sqlrelay.conf:14: element instance:
validity error : Element instance content does not follow the DTD,
expecting (users , connections , router), got (users connections )
</instance>
^
/etc/sqlrelay/sqlrelay.conf:24: element instance: validity error :
Element instance content does not follow the DTD, expecting (users ,
connections , router), got (users connections )
</instance>
^
/etc/sqlrelay/sqlrelay.conf:27: element instance: validity error : Value
"router" for attribute dbase of instance is not among the enumerated set
tringbindvaluelength="4000" maxlobbindvaluelength="71680"
idleclienttimeout="-1"
^
/etc/sqlrelay/sqlrelay.conf:40: parser error : expected '>'
</instances>
^
SQL Relay not started.
Many thabks again for your assistance
Pete
> 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
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Sqlrelay-discussion mailing list
> Sql...@li...
> https://lists.sourceforge.net/lists/listinfo/sqlrelay-discussion
>
--
The Wellcome Trust Sanger Institute is operated by Genome Research
Limited, a charity registered in England with number 1021457 and a
company registered in England with number 2742969, whose registered
office is 215 Euston Road, London, NW1 2BE.
|