How To Reset MySql Root User Password/Recover MySql Root User Password
Today I will share with you one line command which you can use in two case:
1) When you forgotten MySql root user password.
2) To reset MySql root user password.
Step 1 : Login into your server by ssh root user
Step 2 : Check Installed MySql version
root@db:~# apt-cache policy mysql-server
Here you can see version of MySql. In my testing machine I am clearly see its MySql-server-5.5. If you have other version then you can change it during next command.
Step 3 : Now run command for reset password or reconfigure MySql root user password.
This command will ask you to setup new password for MySql root user. Set password and Enjoy