Advertisement
Guest User

Untitled

a guest
Apr 5th, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. #Start the MySQL server instance or daemon with the --skip-grant-tables option (security setting).
  2. $mysqld_safe --skip-grant-tables
  3.  
  4. $ mysql -u root mysql
  5. $mysql> UPDATE user SET Password=PASSWORD('my_password') where USER='root';
  6. $mysql> FLUSH PRIVILEGES;
  7.  
  8. #If you face the unknown field Password error above use:
  9. #update user set authentication_string=password('my_password') where user='root';
  10. #Finally, restart the instance/daemon without the --skip-grant-tables option.
  11.  
  12. $ /etc/init.d/mysql restart
  13. #You should now be able to connect with your new password.
  14.  
  15. $ mysql -u root -p
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement