tente isso
echo "TRY CONNECTION";
$conn =new mysqli($servername, $username, $password,$database);
echo "EXECUTED CONNECTION";
ou pode ser isso
$con = mysqli_connect("localhost","my_user","my_password","my_db");
echo "TRY CONNECTION";
$conn =new mysqli($servername, $username, $password,$database);
echo "EXECUTED CONNECTION";
$con = mysqli_connect("localhost","my_user","my_password","my_db");