mysql : change root password

May 24th, 2013 § 0 comments

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.

Revath S Kumar [RSK]

- Rubyist / JavaScripter - Yeoman Team member - Open source enthusiast - Blogger @ PHPRepo and http://blog.revathskumar.com - Coder @ Whatznear - Google fanboy - jQuery lover

More Posts - Website - Twitter - Facebook - LinkedIn - Pinterest - Google Plus - YouTube

Tagged

Comments are closed.