How to set & change root password in MySQL

Set root password MySQL for the first time:

$ mysqladmin -u root password NEWPASSWORD

Change your existing root password:

$ mysqladmin -u root -p'oldpassword' password newpass


Leave a Reply

Your email address will not be published. Required fields are marked *