One of the common issue encountered by server admins while manging mysql is that, the root passwords are unknown. We can reset the root password for getting into the mysql prompt by following the below steps.
Stop mysql service
Start to MySQL server w/o password
mysqld_safe --skip-grant-tables &
Connect to mysql server using mysql client
mysql -u root
Setup new MySQL root user password
mysql> use mysql;
mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
mysql> flush privileges;
Stop MySQL Server:
There are no revisions for this post.