One DB Developer required help to reset MySQL root password for client solution. As per his concerned, his tired many solution from different blog and website, but he failed and the question came to my desk.
As I am always ready for new research and problem solving so I have started my work to reset MySQL root password.
On the internet, you can find many similar solutions and I have also tired from these solutions, but I was failed to reset root/admin password.
After some exercise I got success on this.
In this post, I am sharing the step by step final solution to reset a MySQL password in Linux Ubantu.
Stop MySQL Service.
sudo stop mysql
Kill all running mysqld.
sudo killall -9 mysqld
Starting mysqld in Safe mode.
sudo mysqld_safe --skip-grant-tables --skip-networking &
Start mysql client
mysql -u root
After successful login, please execute this command to change any password.
Here you can visit more about MySQL Flush Command:
You can update mysql root password .
UPDATE mysql.user SET Password=PASSWORD('newpwd') WHERE User='root';
Please execute this command.
This is a final solution to reset MySQL root password in Ubuntu.
Please share your ideas and opinions about this topic with me, your contribution will add true value to this topic.
If anyone has doubts on this topic then please do let me know by leaving comments or send me an email.
If you like this post, then please share it with others.
Please follow dbrnd.com, I will share my experience towards the success of Database Research and Development Activity.
I put up a post every day, please keep reading and learning.
Discover Yourself, Happy Blogging !
Anvesh M. Patel.