title: Symfony 'SQLSTATE[HY000] [1049] Unknown database 'symfony''
body: <p>I'm working on a symfony (2.5.<em>) project with some friend, and we're trying to get out website to work, but somehow it keeps crashing. We've tried updating to a newer version of symfony (2.</em>) and clearing caches, but nothing seems to work.</p>
  
  <p>I believe the source of the problem is that somehow symfony tries to access a 'default' database instead of the database we have specified in the </p>
  
  <pre><code>    parameters.yml
  </code></pre>
  
  <p>Here is the file:</p>
  
  <pre><code>    parameters:
        database_driver: pdo_mysql
        database_host: 127.0.0.1
        database_port: 3306
        database_name: testdb
        database_user: root
        database_password: null
        mailer_transport: smtp
        mailer_host: 127.0.0.1
        mailer_user: null
        mailer_password: null
        secret: ThisIsVerySecret
        locale: en
        debug_toolbar: true
        debug_redirects: false
        use_assetic_controller: true
  </code></pre>
  
  <p><code>Config.yml</code> -> doctrine part</p>
  
  <pre><code>    # Doctrine Configuration
      doctrine:
        dbal:
          driver:   "%database_driver%"
          host:     "%database_host%"
          port:     "%database_port%"
          dbname:   "%database_name%"
          user:     "%database_user%"
          password: "%database_password%"
          charset:  UTF8
        orm:
          auto_generate_proxy_classes: "%kernel.debug%"
          auto_mapping: true
  </code></pre>
  
  <p>The <code>paginaController</code> :</p>
  
  <pre><code>use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  use Sensio\Bundle\FrameworkExtraBundle\Configuration\Cache;
  
  class PaginaController extends Controller
  {
  
      /**
       * @Template
       */
      public function partnersAction()
      {
          return array();
      }
      /**
       * @Template
       * @Cache(expires="tomorrow")
       */
      public function homeAction()
      {
          return array();
      }
  
      /**
       * @Template
       */
      public function geschiedenisAction()
      {
          return array();
      }
  
      /**
       * @Template
       */
      public function profielAction()
      {
          return array();
      }
  
      /**
       * @Template
       */
      public function reunistenAction()
      {
          return array();
      }
  
      /**
       * @Template
       */
      public function linksAction()
      {
          return array();
      }
  }
  </code></pre>
  
  <p>We have created an empty database called <code>symfony</code> to see what would happen. 
  Ar first the page loads, but then we would receive the same error when trying to log in (because we still need to access data in the <code>testdb</code> database). </p>
  
  <pre><code>    Base table or view not found: 1146 Table 'symfony.leden' doesn't exist
  </code></pre>
  
  <p>In this error, it also refers to the <code>symfony</code>-database, instead of the <code>testdb</code>-database.</p>
  
  <p>Is there any possible way to fix this issue, and get symfony to recognize the right database (<code>testdb</code>) and not to access a non-excisting database called <code>symfony</code>?</p>