<?php

$host = "localhost";
$username = "root";
$password = "";
$database = "todo";

$mysql = new mysqli($host, $username, $password, $database);

// Проверка соединения
if ($mysql->connect_error) {
    die("Ошибка соединения: " . $mysql->connect_error);
}