How to reset MySQL Root password

  1. service mysqld stop (To stop the currently running MySQL instance)
  2. mysqld_safe --skip-grant &   (To enter into MySQL in safe mode)
  3. use mysql;
  4. update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';  (To set the new root password)
  5. service mysqld restart (To restart the MySQL instance)


Comments

Popular posts from this blog

Ruby on Rails Installation on Windows 7

How to SSH to remote server without entering password each time.