title: Warning: mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: No such host is known
body: <p>I have just downloaded the wamp server. I want to establish a connection to MySQL database with PHP and I'm using the root user, localhost and the name of my database. My code seems to be correct but when I run it on wamp, I get the following error:
  Warning: mysqli_connect(): php_network_getaddresses: getaddrinfo failed: No such host is known. in C:\wamp\www\cone.php on line 8
  and
  Warning: mysqli_connect(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: No such host is known. </p>
  
  <p>Also, the error message that I haven't been connected to the database(from my if statement) is displayed. </p>
  
  <p>Does this mean that I have to do some extra configuration on the server?</p>
  
  <p>Here is my code:</p>
  
  <p><code>&lt;?php</code></p>
  
  <p><code>$dbcon = mysqli_connect('root','', 'localhost', 'people');</code> </p>
  
  <pre><code>`if(!$dbcon)` 
  `{`
      `die('error connecting to database');`
  `}`
  `echo "success";`
  </code></pre>
  
  <p><code>?&gt;</code></p>
  
  <p>Thank you in advance</p>