1) Start MySQL in safe mode.
2) Reset the root password.
3) Flush privileges.
4) Create a my.cnf file so that you can automatically log-in next time.
# service mysqld stop
# mysqld_safe --skip-grant-tables &
# mysql -u root
> update mysql.user set password=PASSWORD("newpass") where User='root';
> flush privileges;
> exit;
# { echo "[client]"; echo "user=root"; echo "password=newpass"; } >> /root/.my.conf
# service mysqld restart