Reputation: 143
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
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