a. service mysqld stop
b. echo “SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘new-password’);” > /tmp/mysql-init
replace “new-password” with the actual root password that you want to use.
c. mysqld_safe –init-file=/tmp/mysql-initd.
d.In another window, verify the password is in effect
e. service mysqld stop
f. rm /tmp/mysql-init is very important..please ensure that you execute this without fail.