title: Symfony 4 Doctrine not working from console [2002] No such file or directory
body: <p>I´m working with symfony 4 and this error ocurr when runnning doctrine console commands:</p>
  
  <pre><code>In AbstractMySQLDriver.php line 108:
  
  An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory  
  </code></pre>
  
  <p>I think this is because there´s something wrong with the connection but when I run the application it has access to the database without errors, so I can not imagine what is wrong with the connection. </p>
  
  <p>I was able to continue working by creating manually the database and using </p>
  
  <pre><code>php bin/console doctrine:schema:create --dump-sql
  </code></pre>
  
  <p>But this is really unwanted because later when the schema needs to be updated all data would be lost because i would need to re-create the schema instead of updating it. </p>
  
  <p>The app works normally after executing manually the SQL (easyadmin works fine). </p>
  
  <p>Here are my configurations:</p>
  
  <p>.ENV:</p>
  
  <pre><code>DATABASE_URL=mysql://root:root@127.0.0.1:3306/test
  </code></pre>
  
  <p>doctrine.yaml:</p>
  
  <pre><code>parameters:
       env(DATABASE_URL): ''
  
  doctrine:
      dbal:
         driver: 'pdo_mysql'
         server_version: '5.7'
         charset: utf8mb4
  </code></pre>
  
  <p>I tried the drop command just to test and it throwed this:</p>
  
  <pre><code>In DropDatabaseDoctrineCommand.php line 93:
  
  
  Connection does not contain a 'path' or 'dbname' parameter and cannot be dropped.  
  </code></pre>
  
  <p>So I add dbname to doctrine.yaml and didn´t worked. 
  I also tried removing the cache, creating a new project, using a remote mysql, and using sqlite but the errors are the same in both cases !!</p>
  
  <p>Thanks in advance for the help ! </p>