How To Reset MySql Root User Password

How To Reset MySql Root User Password

How To Reset MySql Root User Password/Recover MySql Root User Password

Hello Guys

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. 

Check-MySql-Version

Check-MySql-Version

 

 

 

 

Step 3 : Now run command for reset password or reconfigure MySql root user password.

root@db:~#dpkg-reconfigure mysql-server-5.5

Reset MySql Password command

Reset MySql Password command

 

 

 

This command will ask you to setup new password for MySql root user. Set password and Enjoy 

Great Idea

 

Leave a Reply

Time limit is exhausted. Please reload the CAPTCHA.