title: Apache/MySQL connection issue, throws Unable to connect php_network_getaddresses: getaddrinfo error
body: <p>I am building a simple DataBase but i can't get a connection from apache to MySQL</p>
  
  <p>Here is my code :</p>
  
  <pre><code>&lt;?php  
  DEFINE ("DB_USER", "root");
  DEFINE ("DB_PASS", "1234ninja");
  DEFINE ("DB_HOST", "localhost");
  DEFINE ("DB_NAME", "test3");
  $mysql = @mysqli_connect("DB_HOST", "DB_USER", "DB_PASS", "DB_NAME") 
      OR die("Unable to connect ". mysqli_connect_error());
  echo "Great!";
  ?&gt;
  </code></pre>
  
  <blockquote>
    <p><strong>Error message:</strong> Unable to connect php_network_getaddresses:
    getaddrinfo failed:</p>
  </blockquote>