phpMyAdmin access denied for user 'root'@'localhost' (using password: NO)

前端 未结 15 1867
北海茫月
北海茫月 2021-02-01 06:18

I am unable to connect to my MySQL in xampp I have this error:

MySQL said: Documentation

1045 - Access denied for user \'root\'@\'localhost\'

15条回答
  •  旧时难觅i
    2021-02-01 06:55

    You may had set different passwords for user 'root' or have been changed your password. I had same error as :

    mysqli_real_connect(): (HY000/1045): Access denied for user 'root'@'localhost' (using password: YES)

    and I found that my root password for phpmyAdmin is not same on both 'mysql' and 'phpmyadmin' databases, so I updated my password for 'phpmyadmin' database same as 'mysql' database as follow:

    sudo gedit /etc/phpmyadmin/config-db.php

    and update the fields

    $dbuser='root';

    $dbpass='myNewPassword'; <-- update your new password here

    Best wishes!

提交回复
热议问题