aquaballoon

MySQL - Recover root Password

Oct 7th, 2014
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.33 KB | None | 0 0
  1. $ /etc/init.d/mysql stop
  2.  
  3. $ mysqld_safe --skip-grant-tables &
  4.  
  5. /* go to "Change Users and Password */
  6. or,
  7.  
  8. $ mysql -u root
  9.  
  10.    mysql> use mysql;
  11.    mysql> update user set password=PASSWORD("123abc") where User='root';
  12.    mysql> flush privileges;
  13.    mysql> quit
  14.  
  15.  
  16. $ /etc/init.d/mysql stop
  17.  
  18. $ /etc/init.d/mysql start
Advertisement
Add Comment
Please, Sign In to add comment