Re: [exim] Different MySQL connections for different jobs

Etusivu
Poista viesti
Vastaa
Lähettäjä: W B Hacker
Päiväys:  
Vastaanottaja: exim users
Aihe: Re: [exim] Different MySQL connections for different jobs
Mike Cardwell wrote:

> * on the Tue, Sep 05, 2006 at 09:29:47PM +0800, W B Hacker wrote:
>
>
>>The server queried doesn't know or care what caused the access, so long as it
>>arrives on the right doorstep with the correct credentials.
>>
>>http://exim.org/exim-html-4.62/doc/html/spec_html/ch09.html#id2546221
>>
>>Says, in part;
>>
>>====
>>
>>"... Here is an example where two MySQL servers are listed:
>>
>>hide mysql_servers = localhost/users/root/secret:\
>>                      otherhost/users/root/othersecret

>>
>>For MySQL and PostgreSQL, a host may be specified as <name>:<port> but because
>>this is a colon-separated list, the colon has to be doubled. For each query,
>>these parameter groups are tried in order until a connection and a query succeeds."
>>
>>====
>
>
> I did consider configuring it in such a way that we have:
>
> hide mysql_servers = slavedetails : masterdetails
>
> When it tries to write to the slave it could fail, and then attempt the
> write to the master, which then replicates back to the slave. That's not
> a very tidy solution though.
>
> I'd rather choose the db connection explicitly than exim to try them
> in order until one works...
>
>
>>Apologies, Philip. You told us what we needed all along....
>
>
> I'm not sure he has...
>
> Mike
>


Well - perhaps I am reading too much 'between the lines', but ISTM, that so long
as you use the 'expanded' form, wherein the DB and table are specified, then
when an SQL query specifies a table, only the (one or more) entries that DO
match will be tried - so that is 'specific enough'.

- Especially if there is only one per each, rahter than fallback/failover.

Note, too Philip's other example in his post.

Got to get ready to (physically) switch continents after all sumer away, so no
time to test for another 2 weeks. Wives before servers....

Bill