Reset Forgotten MySQL Root Password in just 5 steps........

Reset Forgotten MySQL Root Password



First things first. Log in as root and stop the mysql daemon. Now lets start up the mysql daemon and skip the grant tables which store the passwords.
1.mysqld_safe --skip-grant-tables &
You should see mysqld start up successfully. If not, well you have bigger issues. Now you should be able to connect to mysql without a password.
2. mysql --user=root mysql
3.update user set Password=PASSWORD('new-password') where user='root';
4. flush privileges;
5.exit;

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete