Exim specifies an option group to the MySQL client library. The default
value given is "exim", so in `/etc/my.cnf` you can have a section
starting `[exim]` and put whatever options you want in there.
(MySQL searches a range of places, my last blog-post where I touched
this, I noted that Ubuntu required /etc/mysql/my.cnf so ... figure out
which ones actually work on your distribution; I'm going to write
/etc/my.cnf here)
If that's not specific enough and you want other clients, then the Exim
configuration option `mysql_servers` or the server-spec at the start of
the query has an expanded syntax, as described in "Special MySQL
features" in The Exim Specification:
host:port(socket)[group]
The `[group]` part there is the name of the group parsed from
`/etc/my.cnf`. So `mysql_servers = maildb.example.com[exim-utf8]`
should work just fine.
My MySQL is incredibly rusty, but I think something like: