title: getaddrinfo failed: No such host is known
body: <p>I tried to connect to phpMyAdmin database but encounter an error <strong>Warning: mysqli::mysqli(): php_network_getaddresses: getaddrinfo failed: No such host is known</strong>. Below coding is the one that I currently use.</p>
  
  <pre><code>$servername = "http://localhost:8080";
  $username = "root";
  $password = "";
  $db = "dbLogin";
  
  $conn = new mysqli($servername, $username, $password, $db);
  
  if ($conn-&gt;connect_error) {
      die("Connection failed: ".$conn-&gt;connect_error);
  }
  else {
      echo "Connection success!";
  }
  </code></pre>
  
  <p>When I run my system, It will still show the message <strong>connection success!</strong> but together with the error I mentioned.</p>