How to Reset MySQL root password.

1) First Stop the MySQL service with command  service mysql stop

2) Execute the command  mysqld --skip-grant-tables --skip-networking

3) Now you can connect to MySQL without  the root user password

4) Connect using mysql -u root

5) mysql> UPDATE mysql.user SET Password=PASSWORD('newPassword') WHERE User='root';

  mysql> FLUSH PRIVILEGES;

  mysql> exit
6) Restart the MySQL service .

 

Comments are closed.

(adsbygoogle = window.adsbygoogle || []).push({}); //--> Feedjit Flag Counter