Change MySQL user password

From ezUnix
Jump to: navigation, search
                                    pdf_icon.png Download this article as a single PDF document 

I'd like to change a password for user called ezunix using UNIX / Linux command line option.
Here's how to do that:

  • First, login to MySQL server, type following command at shell prompt to login as root
# mysql -u root -p
  • Use mysql database :
mysql> use mysql;
  • Change password for user tom:
mysql> update user set password=PASSWORD("NEW-PASSWORD-HERE") where User='ezunix';
mysql> flush privileges;


<comments />
Talk:Change MySQL user password