Advertisement
jeffersonvv

Reset Password MySQL

Apr 27th, 2015
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. # 1. Stop the mysql daemon
  2. sudo /etc/init.d/mysql stop  
  3.  
  4. # 2. Disable the security checks
  5. mysqld_safe --skip-grant-tables &
  6.  
  7. # 3. Login as root
  8. mysql -u root -p mysql
  9.  
  10. # 4. Change the root password
  11. update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User="root";
  12. exit;  
  13.  
  14. # 5. Restart MySql
  15. sudo service mysql restart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement