pramod
pramod

Reputation: 143

how to reset password of root user in MySQL workbench

I am accessing MySQL database using workbench 6.3 using root user.but we have forgot password of root user.so how can i reset password of root user

Upvotes: 7

Views: 32477

Answers (1)

pro_cheats
pro_cheats

Reputation: 1582

From MySQL Dev Page - Generic Instructions, (try these in comand line or mysql prompt)

MySQL 5.7.6 and later:

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';

MySQL 5.7.6 and earlier:

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('MyNewPass');

Kindly refer the dev page for Platform Specific Options.

Upvotes: 19

Related Questions