Hi:
I can’t to connect database mysqli with php. I a using localhost with XAMPP. i can only connecty using localhost, without username and password. If i just put localhosat i can access, but i can’t create database. so i don’t what to do. Here is my script.
<?php
// Crea la conexión
$con=mysqli_connect(“localhost”,”hugo”,”******”);
// Checa la conexión
if (mysqli_connect_errno())
{
echo “Failed to connect to MySQL: ” . mysqli_connect_error();
}
else
{
echo “Se conecto a la BD.<p>”;
}
?>
And this is error message
Warning: mysqli_connect(): (HY000/1045): Access denied for user ‘hugo’@’localhost’ (using password: YES) in C:xampphtdocsConnect.php on line 8
Failed to connect to MySQL: Access denied for user ‘hugo’@’localhost’ (using password: YES)
Anyway thanks for read this question and have a nice day.