Change a Password for MySQL on Linux via Command Line

February 13, 2020 Liquid Web

In this video, we describe how to change a password for a MySQL user via the command line.

Commands used:
mysql -u root -p
use mysql;
update user set password=PASSWORD('password') where User='root';
flush privileges;
type quit, then  enter

The related article for this article can be found here: 

https://www.liquidweb.com/kb/change-a-password-for-mysql-on-linux-via-command-line/

For more information about this and other topics, visit us at https://www.liquidweb.com/kb/

To learn more about our private cloud offerings, visit: 
https://www.liquidweb.com/products/private-cloud/

Video by: Justin Palmer

About the Author

Liquid Web

Liquid Web powers online content, commerce, and potential for SMB entrepreneurs and the designers, developers and digital agencies who create for them. Sign up for our newsletter to stay up to date with our latest content.

More Content by Liquid Web
Previous Video
How to Add a User and Grant Root Privileges on CentOS 7
How to Add a User and Grant Root Privileges on CentOS 7

Learn how to add a user and grant root privileges on a CentOS 7 server. Upon completion, you should now hav...

Next Video
Create a MySQL Database on Linux via Command Line
Create a MySQL Database on Linux via Command Line

In the second video in this video series on MySQL via Command Line, we describe how to create a MySQL datab...

Learn What Qualities to Look for in Your Next Host in Our New Guide!

Download Now