Set the password to MySQL

MySQL installed with a blank password for the root user. If you want to set a root password, execute below command.

[root@host]# mysqladmin -u root password "NEWPASSWORD";

After execute above command, you should have to check, new password set or not. You can check from below command.

[root@host]# mysql -u root -p
Enter password:******* (Which are set recently)
 

Leave a Reply

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