Connection failed:php_network_getaddresses: getaddrinfo failed: No address associated with hostname

Connection failed:php_network_getaddresses: getaddrinfo failed: No address associated with hostname

<?php
$servername  = "sql306.epizy.com "; 
$username = "epiz_33516752";
$password = "*********";
$db = "epiz_33516752_db ";

$conn = mysqli_connect($servername, $username, $password, $db);

if(!$conn){
    die("Connection failed:" . mysqli_connect_error());
}

?>

There is password

The extra spaces may be causing it. Remove all extra spaces and chars from your code.

7 Likes

Thank you!

No problem glad I could help

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.