title: Symfony 3 connection to multiple databases
body: <pre><code>dynamic:
  driver:   %database_driver%
  host:     %database_host%
  port:     %database_port%
  dbname:   %database name%
  user:     %database_user%
  password: %database_password%
  charset:  UTF8
  </code></pre>
  
  <p>Hi everybody</p>
  
  <p>I would like to connect to multiple databases dynamically. I read this tutorial <a href="http://symfony.com/doc/current/cookbook/doctrine/multiple_entity_managers.html" rel="noreferrer">http://symfony.com/doc/current/cookbook/doctrine/multiple_entity_managers.html</a> and it works as it was explained.</p>
  
  <p>But my only problem is to change the value of dbname directly from my Controller to connect to all my databases.</p>
  
  <p>It will be 24 hours that I am on this problem. if you have ideas I really need it</p>