UNIX BLOG

Blog for NIX system based administrators

How to change Forgotten Mysql root Password

To reset forgotten root password in Linux(Ubuntu,Kubuntu,debian,redhat,centos,fedora) you need to do the following things:
mysqld_safe --skip-grant-tables
mysql --user=root mysql
update user set Password=PASSWORD('new-password') where user='root';
flush privileges;
exit;

Tags: , , , ,


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>