title: Warning: mysqli_connect(): (HY000/2002): No such file or directory
body: <p>I'm trying to install vanilla forums on my Mac, and for this I just created a database and a user from the MySQL command line:</p>
  
  <pre><code>mysql&gt; CREATE DATABASE vanilla;
  Query OK, 1 row affected (0.00 sec)
  
  mysql&gt; create user 'vanilla_user3'@'localhost' IDENTIFIED BY 'vanilla_password';
  Query OK, 0 rows affected (0.00 sec)
  
  mysql&gt; GRANT ALL PRIVILEGES ON * . * TO 'vanilla_user3'@'localhost';
  Query OK, 0 rows affected (0.00 sec)
  
  mysql&gt; FLUSH PRIVILEGES;
  Query OK, 0 rows affected (0.00 sec)
  </code></pre>
  
  <p>So I try to connect using the following code:</p>
  
  <pre><code>$con=mysqli_connect("localhost","vanilla_user3","vanilla_password","vanilla");
  if (mysqli_connect_errno($con)) {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
  }
  </code></pre>
  
  <p>but unfortunately, I get an error saying </p>
  
  <blockquote>
    <p>Warning: mysqli_connect(): (HY000/2002): No such file or directory in /Users/kramer65/Sites/vanilla/info.php on line 3
    Failed to connect to MySQL: No such file or directory</p>
  </blockquote>
  
  <p>Any idea where I'm going wrong?</p>