subject: 2 Ways to Change or Update Mysql Root Password [print this page] 2 Ways to Change or Update Mysql Root Password
I worked in a technical company and always found that the client lost or forgot the mysql password. Therefore, I would like to share the steps to change or update the mysql password.
Solution 1)
Forgot your password? Want to change your mysql root password under under Linux, FreeBSD, OpenBSD and UNIX like operating system over ssh / telnet session?
After the operation system installed completely, there are null for mysql root password. Therefore, you need to set the root password for first time by typing:
# mysqladmin -u root password YOURNEWPASSWORD
Sometimes, you need to change or update your mysql root password, then you could use this command: