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
Enter the following: mount -o remount rw /sysroot and then hit ENTER. Now type chroot /sysroot and hit enter. This will change you into the sysroot (/) directory, and make that your path for executing commands. Now you can simply change the password for root using the passwd command.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With