Guest User

Untitled

a guest
Feb 12th, 2018
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. # Log in to your account using SSH.
  2.  
  3. # Stop the MySQL server.
  4.  
  5. service mysqld stop #for Centos and Fedora
  6. service mysql stop #for Debian and Ubuntu
  7.  
  8. # Restart the MySQL server with the —skip-grant-tables option
  9.  
  10. mysqld_safe --skip-grant-tables &
  11.  
  12. # Log into MySQL.
  13.  
  14. mysql
  15.  
  16. # At the mysql> prompt, reset the password.
  17.  
  18. UPDATE mysql.user SET Password=PASSWORD('NEW-YOUR-PASSWORD') WHERE User='root';
  19.  
  20. # At the mysql> prompt
  21.  
  22. FLUSH PRIVILEGES;
  23. exit;
  24.  
  25. # Stop the MySQL server.
  26.  
  27. mysqladmin -u root -p shutdown
  28.  
  29. # Start Mysql
  30.  
  31. service mysqld start #for Centos & Fedora
  32. service mysql start #for Debian & Ubuntu
Add Comment
Please, Sign In to add comment