Knowledgebase


Portal Home > Knowledgebase > Hosting FAQ's > How to reset mysql root password ?

How to reset mysql root password ?

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.


Also Read