Go2Linux | Linux Operating System

A site dedicated to: Linux Operating System

How to set / Change root password in mySQL

Date: 2007-07-01 00:00:00 -0400

When you first install MySQL you need to set a password for root to be sure nobody is going to access your Databases.

If your MySQL is a fresh installation you will need this command

mysqladmin -u root password newpassword

This is used when there is no previous password, if what you need is to change a password already set, you will need this other command.

mysqladmin -u root -p oldpassword newpassword

And finally if you want to change some other's password (not root) use this command

mysqladmin -u someuser -p oldpassword newpass

If you liked this article please share it.

powered by TinyLetter

If you want to contact me in any other way, please use the contact page.