Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mysqli::real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO) error on Mac

This is the error message I got after I tried to make a password and username for localhost and root. Please help me. I am using Mac by the way.

MySQL said: Documentation

Cannot connect: invalid settings.

mysqli::real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: NO)

phpMyAdmin tried to connect to the MySQL server, and the server rejected the connection. You should check the host, username and password in your configuration and make sure that they correspond to the information given by the administrator of the MySQL server.

like image 288
nit21 Avatar asked Oct 12 '25 11:10

nit21


1 Answers

go to xampp\mysql\bin\my.ini and open it. change the port to 3307 and go to xampp\phpMyAdmin\config.inc.php and check the name of the host $cfg['Servers'][$i]['host'] = 'localhost:3307';

like image 99
soufiane_ben_yaala Avatar answered Oct 14 '25 01:10

soufiane_ben_yaala



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!