Here is a quick tip on how to change mysql password for root using mysqladmin.

Mysqladmin change root password

First, you want to stop the mysql daemon.

# /etc/init.d/mysql stop

Second, issue a command to allow you to change the mysql root password by skipping the tables that grant permissions.

# mysqld --skip-grant-tables

Next, using mysqladmin you can now change the root password

# mysqladmin -u root password 'newpasswd'

That’s it! Now you can start the mysql daemon again.

# /etc/init.d/mysql start

Popularity: 9% [?]

Tagged with:

Filed under: Linux

Like this post? Subscribe to my RSS feed and get loads more!