<?php
$database_name = "database3";
try {
    $pdo = new PDO(
        "mysql:host=localhost;dbname=database3;charset=utf8",
        "username3",
        "password3",
        [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]
    );
} catch(PDOException $e) {
    die("Erreur de connexion : " . $e->getMessage());
}