mysql : change root password

May 24th, 2013 § 0 comments § permalink

Please note that this post doesn’t cover How to reset mysql root password if you are forgotten.

Recently I noticed that, its quite simple to change the root password of the mysql. mysqladmin command is quite handy for this.

mysqladmin -u<username> -p password <new password>

Here substitute <username> with root and <new password> with your new root password. Since we are passing -p option to the command, it will prompt for your old password.

Prompt for old password

Prompt for old password

Enter your old password and you are done.

You are done.

Thanks for reading.