Advertisement
Guest User

Untitled

a guest
Jan 5th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. # 1
  2. mysql -u root
  3. SET PASSWORD FOR 'root'@'localhost' = PASSWORD('[new password]');
  4.  
  5. # 2
  6. mysqladmin -u root password "[new password]";
  7. mysqladmin -u root password "[old password]" "[new password]";
  8.  
  9. # 3
  10. mysql -u root
  11. use mysql;
  12. UPDATE user SET Password = PASSWORD('[new password]') WHERE user = 'root';
  13. FLUSH PRIVILEGES;
  14.  
  15. # 4
  16. mysqld_safe --skip-grant-tables # modify my.cnf or my.ini
  17. mysql -u root # login
  18. use mysql;
  19. UPDATE user SET password=PASSWORD('[new password]') WHERE user='root';
  20. FLUSH PRIVILEGES;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement