Guest User

Untitled

a guest
Dec 22nd, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.90 KB | None | 0 0
  1. $ cd /usr/local/mysql/bin
  2. $ ./mysqladmin -u root password 'password'
  3.  
  4. Welcome to the MySQL monitor. Commands end with ; or g.
  5. Your MySQL connection id is 224
  6. Server version: 5.5.13 MySQL Community Server (GPL)
  7.  
  8. Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
  9.  
  10. Oracle is a registered trademark of Oracle Corporation and/or its
  11. affiliates. Other names may be trademarks of their respective
  12. owners.
  13.  
  14. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.
  15.  
  16. mysql>
  17.  
  18. $ mysql -u root
  19. mysql> USE mysql;
  20. mysql> UPDATE user SET password=PASSWORD("NEWPASSWORD") WHERE User='root';
  21. mysql> FLUSH PRIVILEGES;
  22. mysql> quit
  23.  
  24. mysql> UPDATE user SET authentication_string=PASSWORD("NEWPASSWORD") WHERE User='root';
  25.  
  26. /usr/local/mysql/bin/mysqladmin -u root password NEW_PASSWORD_HERE
  27.  
  28. cd /usr/local/mysql/bin/
  29. ./mysql -u root -p
  30. > Enter password: [type old password invisibly]
  31.  
  32. use mysql;
  33. update user set password=PASSWORD("NEW_PASSWORD_HERE") where User='root';
  34. flush privileges;
  35. quit
  36.  
  37. 1. sudo /usr/local/mysql/support-files/mysql.server stop
  38. 2) sudo /usr/local/mysql/support-files/mysql.server start --skip-grant-tables
  39. 3) /usr/local/mysql/support-files/mysql
  40. 4) mysql> FLUSH PRIVILEGES;
  41. 5) mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass';
  42. 6) Ctrl + z
  43. 7) sudo /usr/local/mysql/support-files/mysql.server start
  44. 8) /usr/local/mysql/support-files/mysql -u root -p
  45. 9) enter the new password i.e MyNewPass
  46.  
  47. sudo /usr/local/mysql/support-files/mysql.server stop
  48.  
  49. sudo mysqld_safe --skip-grant-tables
  50.  
  51. mysql -u root
  52.  
  53. UPDATE mysql.user SET Password=PASSWORD('password') WHERE User='root';
  54.  
  55. FLUSH PRIVILEGES;
  56.  
  57. q
  58.  
  59. sudo /usr/local/mysql/support-files/mysql.server start
  60.  
  61. sudo su
  62.  
  63. sudo /usr/local/mysql/support-files/mysql.server stop
  64.  
  65. mysql -u root
  66.  
  67. UPDATE mysql.user SET authentication_string=PASSWORD('new_password') WHERE User='root';
  68.  
  69. FLUSH PRIVILEGES;
Add Comment
Please, Sign In to add comment