mysqli_real_connect(): (HY000/1045): Access denied code example
Example 1: mysqli_real_connect(): (28000/1045): Access denied for user 'u0738423'@'www8.aname.net' (using password: YES)
$connection = mysqli_connect('localhost', 'root', '', 'test');
$connection = mysqli_connect('localhost', 'root', 'P@$$w0rd', 'test');
Example 2: php catch mysqli_connect(): (HY000/1045): Access denied
$conn = mysqli_connect( '<server>', '<username>', '<password>', '<database-name>');
if (!$conn) {
echo mysqli_connect_errno() . ":" . mysqli_connect_error();
exit;
}