title: Symfony Unknown database
body: <p>I have an issue with symfony. when i execute this code</p>
  
  <pre><code>$quiz = new Quiz();
  $quiz-&gt;setTitle('A quiz.');
  $quiz-&gt;setAuthor('Alexandre');
  $quiz-&gt;setContent("Blabla…");
  $em = $this-&gt;getDoctrine()-&gt;getManager();
  $em-&gt;persist($quiz);
  </code></pre>
  
  <p>Symfony show me this error</p>
  
  <pre><code>An exception occured in driver: SQLSTATE[HY000] [1049] Unknown database 'quiz' 
  </code></pre>
  
  <p>But if i try to create the database it says that the database exists</p>
  
  <pre><code>php bin/console doctrine:database:create
  Could not create database `symfony` for connection named default
  An exception occurred while executing 'CREATE DATABASE `symfony`':
  
  SQLSTATE[HY000]: General error: 1007 Can't create database 'symfony'; database exists
  </code></pre>
  
  <p>And </p>
  
  <pre><code>php bin/console doctrine:schema:update --force
  Nothing to update - your database is already in sync with the current entity metadata.
  </code></pre>
  
  <p>This is my app/config/parameters.yml file</p>
  
  <pre><code># This file is auto-generated during the composer install
  parameters:
      database_host: localhost
      database_port: ~
      database_name: symfony
      database_user: root
      database_password: ~
      mailer_transport: smtp
      mailer_host: 127.0.0.1
      mailer_user: null
      mailer_password: null
      secret: 43c1fdc9712102f8b9c3e33ed1c46befd3dae9ab
  </code></pre>
  
  <p>Thank you for your help</p>