1. You need to open 2 terminal/shell.
At terminal 1:
2. At terminal 1, stop your mysql deamon if it running: $ /etc/init.d/mysqld stop and enter. The mysql deamon is stop now.
3. Type $ mysqld_safe --skip-grant-tables
Terminal 2:
4. Change root password to new password: mysql> update user set password=password('newpassword') where user='root';
5. Flush mysql privileges: mysql> flush privileges;
6. Exit mysql: mysql> exit
7. Restart mysql: $ /etc/init.d/mysqld start
After finish all process, go to your terminal 1 and press Ctrl-C on your keyboard.
Thats all.