How To Change MySQL Password
Changing the password for a user in a MySQL database is easy. Here is how you can do it.
Connect using the CLI:
mysql -u username -p
Change the password for user1 at local host:
ALTER USER 'user1'@'localhost' IDENTIFIED BY 'mynewpassword3!';
Flush the privileges:
FLUSH PRIVILEGES;
Exit when done:
EXIT;