Forgetting? Isn’t that a Sign Of Old Age? 😉 . Okay , I’m here to help you! You can reset the mysql password as follows :-
First you need to stop the mysql service by running the following command :
service mysql stop
Now Run the following command and it will start the mysql in the background without any privileges .
/usr/bin/mysqld_safe –skip-grant-tables &
Now you will be able to login into mysql without any password. Once logged in, set your new mysql password.
#mysql
mysql> use mysql;
mysql> update user set password=PASSWORD(“new_password_here”) where User=’root’;
mysql> flush privileges;
mysql> quit;
service mysql restart
Hey , you should now be able to login . Cheers!
Recent Comments