0

When I try to connect to the database I recieve this error :

Warning: mysqli::__construct(): (HY000/1045): Access denied for user 'eyohan01'@'localhost' (using password: YES) in C:\xampp\htdocs\artgallery\connect.php on line 7 Connection failed: Access denied for user 'eyohan01'@'localhost' (using password: YES)

<?php
$connect=mysqli_connect("localhost","root","","")or die("we did not connect to the database");
mysqli_select_db($conn,"artgallery")or die("we did not select database");
?>
Bill Karwin
  • 538,548
  • 86
  • 673
  • 828
  • 8
    With respect, this is a case where careful reading of the error message should point you in the right direction. Either your username is not registered as a MySQL user or the password you provided is incorrect. – O. Jones Apr 09 '19 at 15:32
  • Have you read this: https://dev.mysql.com/doc/refman/8.0/en/problems-connecting.html ? – Bill Karwin Apr 09 '19 at 21:39
  • Possible duplicate of [Access denied error with php xampp](https://stackoverflow.com/questions/39876020/access-denied-error-with-php-xampp) – nullpointr Apr 09 '19 at 21:41

0 Answers0