#mysqld_safe –skip-grant-tables&
root#mysql
mysql>use mysql
mysql>update user set password=PASSWORD(‘abcd’) where User=’root’
mysql>flush privileges
mysql>quit

Now restart mysqld