I keep getting the question on how to change a mysql root password. Here is a quick tip on how to change the MySQL password from the command line.

# /etc/init.d/mysql stop
# mysqld --skip-grant-tables
# mysqladmin -u root password 'newpass'
# /etc/init.d/mysql start

Change MySQL Password for a standard user

You can also change the mysql password for a standard user using mysqladmin.

# mysqladmin -u username -p oldpass newpass

Popularity: 4% [?]

Tagged with:

Filed under: Linux

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