MySQL

How to change the root password for MySql under Linux in the command line

Written by Ian Carnaghan · 10 sec read >

You will need to know the current root password in order to change it

In the command line type in and execute the following command

mysqladmin -u root -pOLD_PASSWORD password NEW_PASSWORD

Replace OLD_PASSWORD with your old password and NEW_PASSWORD with your new password.

Last Updated On March 23, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. In my spare time I teach undergraduate classes in web development. Profile

Leave a Reply

avatar
  Subscribe  
Notify of