Re: [exim] mysql_servers for multiple servers

Top Pagina
Delete this message
Reply to this message
Auteur: Mike Cardwell
Datum:  
Aan: exim users
Onderwerp: Re: [exim] mysql_servers for multiple servers
WJCarpenter wrote:

> My reading of the spec/book is that mysql_servers is a global ("main
> configuration") option, so any MySQL queries are going to look, in
> order, at the same list of hosts specified therein.
>
> I have a couple of unrelated MySQL queries that I want to do to
> different MySQL servers. I'd rather avoid the attempted queries of
> the wrong servers. Is there any per-query or per-router or per-ACL or
> per-whatever way of specifying the MySQL server info?


Define the two databases:

hide mysql_servers =
localhost::(/var/run/mysqld/mysqld.sock)/db1/user/pass :
localhost::(/var/run/mysqld/mysqld.sock)/db2/user/pass

And then when you perform your queries, specify the db name:

SELECT * from db1.table
SELECT * from db2.table

It's an exim weirdism.

Mike