General Enquiry : info@sengkedcloud.com

Back

EDUCATION DETAIL

image

Have you ever for­got­ten the root pass­word on one of your MySQL servers? No? Well maybe I’m not as per­fect as you. This is a quick h00tow (how to) reset your MySQL root pass­word. It does require root access on your server. If you have for­got­ten that pass­word wait for another arti­cle.

First things first. Log in as root and stop the mysql dae­mon. Now lets start up the mysql dae­mon and skip the grant tables which store the pass­words.

mysqld_safe --skip-grant-tables

You should see mysqld start up suc­cess­fully. If not, well you have big­ger issues. Now you should be able to con­nect to mysql with­out a pass­word.

mysql --user=root mysql
set password for 'root'@'[host]' = password('new-password');

Now kill your run­ning mysqld, then restart it nor­mally. You should be good to go. Try not to for­get your pass­word again.

Notes : If you are using remote application like putty, you must have two session of putty, one for running mysqld_safe --skip-grant-tables and other for update root password

Source : http://www.cmdln.org/2008/02/09/reset-mysql-root-password/

Ready to develop your dream application?

Start exploring the latest cloud computing technology from Sengked Cloud