Rest Mysql root Password

Reset Mysql Root Password

  1. Kill the mysql daemon by loggin in as root

  2. Start mysql in safe mode :

mysqld_safe --skip-grant-tables

3. SSH using another session or login to another terminal<br></br>
4. Connect to mysql without password, you should be able to get in.<br></br>
mysql -u root```

`use mysql;<br></br>`  
 5.Update the password

update user set Password=PASSWORD('new-password') where user='root';


flush privileges;


exit;```

You should have the new-password as mentioned above as your new mysql root password, stop mysql and restart it.