Thursday, September 24, 2020

MySQL : Reset root password

Solution:

1.Log in to MySQL console with root user  

#mysql -u root -p

2.Created a new user

mysql> CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

3.Grant all privileges to the new user:

mysql> GRANT ALL PRIVILEGES ON *.* To 'user'@'localhost';

4.Change the Authentication Plugin with the password: 

mysql> ALTER USER user IDENTIFIED WITH mysql_native_password BY 'password';


Related Posts:

0 comments:

Post a Comment