I granted all privileges. This is the script:
<?php
require_once 'login.php';
$conn = new mysqli($hn, $un, $pw, $db);
if ($conn->connect_error) die($conn->connect_error);
?>
I have this message in the browser:
Warning: mysqli::mysqli(): (HY000/1045): Access denied for user 'username'@'localhost' (using password: YES) in C:\xampp\htdocs\web-datos\connect_mysql.php on line 11
Access denied for user 'username'@'localhost' (using password: YE
I've tried to connect with no success.
How can I solve this problem?
$unand password$pw. Make sure your user you are trying to use is created and the appropriate password is set.