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

need help, please…

username & password are correct

mysql -e "ALTER USER ‘root’@‘localhost’ IDENTIFIED BY ‘$mpass’;

Run it ounce…

Where $mpass is the root password

still the same as this

Hello @ngadimin,

Create a new user with all privileges and login in phpmyadmin as that user (in below example the new user is newroot and the password is some_password):

mysql -uroot
mysql> CREATE USER 'newroot'@'localhost' IDENTIFIED BY 'some_password';
mysql> GRANT ALL PRIVILEGES ON *.* TO 'newroot'@'localhost' WITH GRANT OPTION;
1 Like

thank you very much for your help, it is very useful

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.