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.
Article Source:
Eric's Blog
Tags:
mysql
Last Updated: 2008-05-27 12:11 AM
Comment: 0
Clicks: 254