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

How to add Startup Script for MySQL or any other services in Centos/RedHat

Ruby on Rails Installation on Windows 7