title: Symfony3 - SQLSTATE[HY000] [2002] No such file or directory
body: <p>I am new to Symfony and started doing some tutorials in order to get some things done. I am working on a Linux Mint 18 machine and a standard Symfony3-project.</p>
  
  <p>I'd like to create a simple database to play around with it, but I am encountering an error I can't find the right solution for.</p>
  
  <p>My parameters.yml file looks like this:</p>
  
  <pre><code>parameters:
     database_host: localhost
     database_port: null
     database_name: symfony
     database_user: root
     database_password: null
     mailer_transport: smtp
     mailer_host: 127.0.0.1
     mailer_user: null
     mailer_password: null
     secret: (not relevant)
  </code></pre>
  
  <p>My Genus.php file looks like this:</p>
  
  <pre><code>namespace AppBundle\Genus;
  
  use Doctrine\ORM\Mapping as ORM;
  
  /**
   * @ORM\Entity
   * @ORM\Table(name="genus")
   */
  class Genus
  {
      /**
       * @ORM\Id
       * @ORM\GeneratedValue(strategy="AUTO")
       * @ORM\Column(type="integer")
       */
      private $id;
      /**
       * @ORM\Column(type="string")
       */
      private $name;
  
  }
  </code></pre>
  
  <p>When I execute the command <strong>dpkg -l php*mysql</strong> I get the following result:</p>
  
  <pre><code>dpkg -l php*mysql
  Desired=Unknown/Install/Remove/Purge/Hold
  | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
  |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
  ||/ Name              Version       Architecture  Description
  +++-=================-=============-=============-============================
  un  php-pdo-mysql     &lt;none&gt;        &lt;none&gt;        (no description available)
  ii  php7.0-mysql      7.0.8-0ubuntu amd64         MySQL module for PHP
  un  php7.0-pdo-mysql  &lt;none&gt;        &lt;none&gt;        (no description available)
  </code></pre>
  
  <p>When I try to create a local database using the command prompt using</p>
  
  <pre><code>XXX@XXX-pc ~/PhpstormProjects/test_symfony $ php bin/console doctrine:database:create
  </code></pre>
  
  <p>This is what I get: </p>
  
  <blockquote>
    <p>[Doctrine\DBAL\Exception\ConnectionException]<br>
    An exception occured in driver: SQLSTATE[HY000] [2002] No such file or
    directory<br>
                                                                                                                                          [Doctrine\DBAL\Driver\PDOException]                  SQLSTATE[HY000]
    [2002] No such file or directory<br>
                                                      [PDOException]                                       SQLSTATE[HY000] [2002] No such file or directory</p>
  </blockquote>
  
  <p>I've came across many other topics but wasn't able to find the right answer. Could anyone tell me what I am missing here? Any help is much appreciated :)</p>