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.
No comments:
Post a Comment