# How to connnect to multiple database

**URL:** <https://forum.mautic.org/t/how-to-connnect-to-multiple-database/19174>\
**Category:** Development\
**Created:** [April 25, 2021, 2:38pm UTC](https://forum.mautic.org/t/how-to-connnect-to-multiple-database/19174 "2021-04-25T14:38:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![neversuspend](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/neversuspend/32/1497_2.png) [@neversuspend](https://forum.mautic.org/u/neversuspend)\
**Post date:** [April 25, 2021, 2:38pm UTC](https://forum.mautic.org/t/how-to-connnect-to-multiple-database/19174/1 "2021-04-25T14:38:08Z")

</div>

I want plugin to connect to other database rather than mautic default database.

How can I achieve it ？

I have modified the app/config/config.php file as below. It does not work.

```
> $container->loadFromExtension('doctrine', [
> 'dbal' => [
> 'default_connection' => 'default',
> 'connections'=>[
> 'default' => $dbalSettings,
> 'model_a' => $model_a,
> 
> ]
> ],
> 'orm' => [
> 'default_entity_manager' => 'default',
> 'entity_managers' => [
> 'default' => [
> 'connection' => 'default'
> ],
> 'model_a' => [
> 'connection' => 'model_a'
> ]
> ]
> ],
> ]);
```
