Advertisement
Guest User

Untitled

a guest
Aug 12th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement