Reset Mysql root password

Here is a quick guide how to reset your mysql root password. For doing this it is a MUST for you to have root access to your server.

1) Open your terminal with root access
2) Stop your mysql daemon
3) Start your mysql daemon without loading the grant table which stores the password by using the command below :

mysqld_safe --skip-grant-tables

4) Log to your mysql panel by using the command below:
mysql --user=root mysql

5) Update the root password

update user set password=PASSWORD('mypassword') WHERE user="root";

flush privileges;


5) Restart your mysql daemon
6) You are done !!!