/etc/init.d/mysql stop
next start damon at safe mode
mysqld_safe --skip-grant-tables
connect to the safe mode daemon into mysql database
mysql --user=root mysql
change pwd
update user set Password=PASSWORD('new-password') where user='root';
Finish
flush privileges; exit;
kill safe moded daemon
than restart deamon
/et/init.d/mysql start
test the new pwd
mysql -u root -p