Use db_shards in boss config.

....

 {db_shards, [
        [{db_host, "localhost"},
         {db_adapter, pgsql},
         {db_port, 5432},
         {db_username, "pg_user"},
         {db_password, "pg_pass"},
         {db_database, "pg_db"},
         {db_shard_id, shard_pg},
         {db_shard_models, [some_postgres_model,another_postgres_model]}],
        [{db_host, "mysql.example.com"},

         {db_adapter, mysql},
         {db_port, 3306},
         {db_username, "my_user"},
         {db_password, "my_pass"},
         {db_database, "my_db"},
         {db_shard_id, shard_my},
         {db_shard_models, [some_mysql_model,another_mysql_model]}]

...


Note that you can still use the default db setting (mock, via mnesia) to 
handle sessions and boss-specific db needs.

-- Nicholas


On Tuesday, March 18, 2014 8:30:53 PM UTC-7, jiale.chan wrote:
>
> Hi,
>
> I have tow mysql db, 
>
> How to connect two or more database by boss_db?
>

-- 
You received this message because you are subscribed to the Google Groups 
"ChicagoBoss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/chicagoboss.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/chicagoboss/05473922-f0ea-4f31-833e-ebb3426c7896%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to