title: mysqli_connect not connecting to localhost
body: <p>As title suggests, I'm getting the following error when using mysqli_connect:</p>
  
  <p>Warning: mysqli_connect(): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/username/Sites/test.php on linez 2</p>
  
  <p>Warning: mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: nodename nor servname provided, or not known in /Users/username/Sites/test.php on line 2
  Could not connect:</p>
  
  <pre><code>&lt;?php
  $link = mysqli_connect(‘localhost’, ‘username’, ‘password’);
  if (!$link) {
      die('Could not connect: ' . mysql_error());
  }
  echo 'Connected successfully';
  mysql_close($link);
  ?&gt;
  </code></pre>
  
  <p>My firewall is turned off and apache2 is turned on, I am able to view localhost/Username/Sites/test.php as well as logging into mysql using localhost.</p>