Notice:
 
 


MySQL Change Passwords

Posted By: Eric Lin
Category: Database
Tags: mysql
Posted Date: 2008-05-27 12:09 AM
No of Comments: 0
Clicks: 254
To set the root password for the first time:

$ mysqladmin -u root password NEWPASS


To update the root password:

$ mysqladmin -u root password OLDPASS NEWPASS


If you want to update root password using mysql command, login to mysql, then:

mysql> update user set password=PASSWORD("NEWPASSWORD") where User='username';


now you will need to update the privileges:

mysql> flush privileges;


Change password for other users:

$ mysqladmin -u username -p OLDPASS NEWPASS


Enjoy MySQL.





Leave your comment.


  Won't be published

What are the LAST THREE CHARACTERS you saw above?