One of the common issue encountered by server admins while manging mysql is that, the root passwords are unknown. We can reset the root password for getting into the mysql prompt by following the below steps.
mysqld_safe --skip-grant-tables &
mysql -u root
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;