-1

I want to configure the mysql xampp password to no password. I opened the my.ini and I saw the following line:

# password       = password

I I don't use password what should I type?

And that's the error I get when I try to connect to mysql through php:

 mysqli_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using     
password: YES) in C:\xampp\htdocs\spikes\functions.php on line 53
Failed to connect to MySQL: Access denied for user 'root'@'localhost' (using password: YES)
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in     
C:\xampp\htdocs\spikes\home.php on line 6
Suresh Kamrushi
  • 15,627
  • 13
  • 75
  • 90

1 Answers1

4

If you haven't set a password for MySQL (check by opening the MySQL config through XAMPP), just put "" as the password. Make sure your PHP script is also configured to use that as the password, because it is currently trying to use one (hence the Using password: YES).

noobsauce
  • 56
  • 3