Learning Academy

The Cure of Ignorance is to Question. MUHAMMAD (PBUH)

MySQL

How to Change/Set the root password of MySQL?

Syntax:

mysqladmin -u root password “newpassword”

mysqladmin -u root -h host_name password “newpassword”

Example:

mysqladmin -u root password ws8dr8as3

mysqladmin -u root -h localhost password ws8dr8as3

You will also want to restart the database server after running this command

sudo /etc/init.d/mysql restart

Muhammad Shaukat

Content Developer at LearnAcad.com

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pin It on Pinterest