$db = mysqli_connect("http://MYHOST.domain", "USERNAME", "PASSWORD", "DATABASE");
// getting rid of DATABASE in the string doesn't help, same result //
if (!$db) {
die("Connection failed: " . mysqli_connect_error());
}
The result is: Connection failed: php_network_getaddresses: getaddrinfo failed: The requested name is valid, but no data of the requested type was found.
In fact, if the MySQL server is located on the same server as the script that is accessing it, then you probably want to use localhost as the hostname to connect to: