Home / Software / Changing the MySQL root password

Changing the MySQL root password

MySQL mints
Question: How do I change my MySQL root password on my dedicated server?

Answer: If you have never set the password for MySQL, the server will allow you to connect as root without any password at all. This is obviously not secure and needs to be fixed. Consider it an important step in configuring your server for the first time.

To setup the password for the first time, type this from the command line:

mysqladmin -u root password 54321

Replace “54321” with your desired password.

To change the password after it has already been set, enter the following:

mysqladmin -u root -p 'oldpassword' password 54321

Replace ‘oldpassword’ with your actual password and 54321 with the new one.

Photo Source: Flickr

Check Also

Uk data center

Professional Data Centres In The UK

A professional data centre is a location in which various pieces of hardware are located …