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.
/etc/init.d/mysql stop
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;
mysql> quit
/etc/init.d/mysql stop
/etc/init.d/mysql start