How To Change MySQL Password

This instruction will work on most  Linux ditros, for windows use the absolute path and make sure mysql is added to your “Environment Path”

1) /etc/init.d/mysql stop

2) mysqld_safe –skip-grant-tables &

3) mysql -u root

4) Setup new MySQL root user password

use mysql;
update user set password=PASSWORD(“NEW-ROOT-PASSWORD”) where User=’root’;
flush privileges;

5) Stop MySQL Server:

/etc/init.d/mysql stop

6) Start MySQL server and test it:

mysql -u root -p

7) Make MySQL Start when OS boots

chkconfig mysqld on

About Matthias 33 Articles
I am a Software Engineer from Houston, TX who love to write codes that brings great ideas to live. In my professional life, I have created software for different industries including Oil & Gas, Finance, Service Provider, Cloud Computing and Embedded Systems. When not writting codes, i enjoy travelling, good music and photography. You can reach me at

Be the first to comment

Leave a Reply

Your email address will not be published.