[ejabberd] Using multiple DB's with ejabberd?

Evgeny Khramtsov xramtsov at gmail.com
Fri May 13 23:32:58 MSK 2016

Fri, 13 May 2016 12:59:28 -0700
Robert Latko <robert at lmi-global.com> wrote:

> Hi all,
> I prefer riak as the backend db for ejabberd however there is no
> pubsub implement. My question is kinda academic BUT is it possible to
> configure multiple db's for ejabberd?
> ./configure --enable-riak --enable-mysql  ?
> Then in the ejabberd.yml
>    mod_pubsub:
>         db_type:mysql
> and everything else riak?

Yes, but this is not how you configure it. You should configure both
mysql and riak connections, set the default_db and use db_type
explicitly if you don't want the default.

In your case this will look like this:

sql_type: mysql
sql_server: "localhost"
sql_database: "ejabberd"
sql_username: "ejabberd"
sql_password: "password"
sql_port: 3306

riak_server: "localhost"
riak_port: 8087

default_db: riak

    db_type: sql

More information about the ejabberd mailing list