Advertisement
Guest User

Untitled

a guest
May 28th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. How to reset the root password for mysql:
  2. Stop mysql:
  3. 1. service mysql stop
  4.  
  5. Run mysql with skip grants to be able to login without any password
  6. 2. mysqld_safe --skip-grant-tables &
  7.  
  8. Login as root
  9. 3. mysql -u root
  10.  
  11. 4. mysql commands:
  12. mysql> use mysql;
  13. mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD-HERE") where User='root';
  14. mysql> flush privileges;
  15. mysql> quit
  16.  
  17. Stop mysql
  18. 5. service mysql stop
  19.  
  20. Start mysql normally:
  21. 6. service mysql start
  22.  
  23. Try to login using your new password:
  24. 7. mysql -u root -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement