How to Reset Root Password in MySQL 8
- By Preneesh AV --
- 21-Jun-2019 --
- 151 Comments
How to Reset Root Password in MySQL 8
connect to mysql server with existing password using following command:
#mysql -u root -p
When password prompt comes enter current mysql password and login to server
in mysql prompt run the below command
mysql > ALTER USER 'root'@'localhost' IDENTIFIED BY 'new_password';
mysql > exit
Type exit command and quit the mysql session and test using new password with below command
#mysql -u root -p
