change mysql password from command line
snippet in sql

change mysql password from command line

user1714

ALTER USER 'root'@'localhost' IDENTIFIED BY 'New-Password';

mysql set password for user

user9566

# `SET PASSWORD FOR <user> = PASSWORD('<plaintext_password>')` is deprecated
SET PASSWORD FOR <user> = '<plaintext_password>';
FLUSH PRIVILEGES;