Setting or Changing MYSQL Root Password

Setting/changing MYSQL root Password
Setting up mysql database password is one of the important tasks which a webmaster should take care of. If you have never set a root password for MySQL, then
server does not require a password at all for connecting as root and if you have already set password for your database and for some reason if you want to change it then you can do so using following commands.
To setup root password for
MySQL databases for first time you need to login to your server as root and will have to use mysqladmin command at shell prompt as follows:

$ mysqladmin -u root password “mysql_password“


However, if you want to change/update your root password, then you will have to use following command



$ mysqladmin -u root -p oldpassword newpassword


after you fire above command you will have to provide password for your MySQL database.

2 comments:

  • Aurore Yokley

    I should certainly express the reality that I need to go together with you on your piece on Setting or Changing MYSQL Root Password | SERVERTECHS. My hubby and i discover more and more persons are simply not happy to hear good sense in relation to this area. Maintain the wonderful job and My partner and i will carry on with observing with all the many other grateful website visitors now.

  • Josiah Urben

    Hey there, You have done a great job. I’ll definitely digg it and personally suggest to my friends. I'm sure they will be benefited from this site.

  • Post a Comment