MySQL Change User Password

How do I change user password under MySQL server? I’d like to change a password for user called tom using UNIX / Linux command line option.

First, login to MySQL server, type following command at shell prompt to login as root
$ mysql -u root -p

2) Use mysql database (type command at mysql> prompt, do not include string “mysql>”):
mysql> use mysql;

3) Change password for user tom:
mysql> update user set password=PASSWORD("NEW-PASSWORD-HERE") where User='tom';

quoted from:

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s