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.

  • 24 Users Found This Useful
Was this answer helpful?

Related Articles

 How To Configure CSF Firewall

    In this how to I will describe how to install /configure full feature firewall on...

 How to remove the blocked ip using iptables

  First check that ip is blocked or not   iptables –L –n | grep   DROP all...

 Install RED5 Server on Centos 5.3

In this how to i will describe how to install RED5 server on Centos 5.3. This how to can be used...

 HowTo install and configure FFmpeg and FFmpeg-Php on a DA server

I saw this headline on another part of the forum and the instructions I thought were a lot more...

 HowTo install and configure FFmpeg and FFmpeg-Php on a DA server

I saw this headline on another part of the forum and the instructions I thought were a lot more...