I am getting familiar with WAMP and struggling with very basics. I created a test website and test database, trying to connect db to the site.

Yet I get constantly error instead of connection, error code not telling what's it all about even if site PHP settings are set to "display errors = yes". I have checked creditials dozen of times, they are correct.

Below is the simple code I made, could you please help me out what's wrong with it? Creditials are from sites mySQL manager, changed so that I can't be indentified but in similar shape.

Should the host be something else than a string? Is the PHP script somehow obsoleted/wrong or does this has something do with the fact that I am playing with free and slow web server host?

My code:

```
<DOCTYPE! html>

<html>
    <body>
        <h1>Working title</h1>

<?php

$host = "sql123.epizy.com";
$username = "epiz_12345678";
$password = "nottherealpassword";
$dbname = "epiz_12345678_NameofDatabase";

$link = mysqli_connect($host, $username, $password, $dbname);

if (!$link) {
    echo "Error: Unable to connect to MySQL." . PHP_EOL;
    echo "Debugging errno: " . mysqli_connect_errno() . PHP_EOL;
    echo "Debugging error: " . mysqli_connect_error() . PHP_EOL;
    exit;
}

echo "Success: A proper connection to MySQL was made! The my_db database is great." . PHP_EOL;
echo "Host information: " . mysqli_get_host_info($link) . PHP_EOL;

mysqli_close($link);
?>

    </body>
</html>

```

Thank you for your help!