SHARE
TWEET

Untitled

a guest Aug 12th, 2016 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Step # 1: Stop the MySQL server process.
  2.  
  3.   # /etc/init.d/mysql stop
  4.  
  5. Step # 2: Start the MySQL (mysqld) server/daemon process with the --skip-grant-tables option so that it will not prompt for a password.
  6.    
  7. # mysqld_safe --skip-grant-tables &
  8.    
  9. Step # 3: Connect to the MySQL server as the root user.
  10.    
  11. # mysql -u root
  12.    
  13. Step # 4: Set a new root password.
  14.    
  15. mysql> use mysql;
  16.   mysql> update user set password=PASSWORD("NEW-ROOT-PASSWORD") where User='root';
  17.   mysql> flush privileges;
  18.   mysql> quit
  19.    
  20. Step # 5: Exit and restart the MySQL server.
  21.    
  22. # /etc/init.d/mysql stop
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top