Not able to reset mysql root password

Hi,

My root password for mysql has some problem as it dosent allow me to login....

all commands to reset it failed. so I removed mysql
yum remove mysql

and installed it by
yum install mysql mysql-devel mysql-server
and it installed fine

I gave chkconfig --levels 235 mysqld on
started my mysql server and when I give

mysqladmin -u root password new_password
it throws error
mysqladmin:
You cannot use 'password' command as mysqld runs
with grant tables disabled (was started with --skip-grant-tables).
Use: "mysqladmin flush-privileges password '*'" instead

I had given a safe mode skip grant command which just hung...could that be a problem....Please let me know what needs to be done.

Regards,
vijaya.

First, stop and start mysqld. Then login and execute :

GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY 'topsecret';

where topsecret is your current password. Then change the password, you also might want to look at this article.