modify user password mysql code example
Example 1: change mysql password from command line
ALTER USER 'root'@'localhost' IDENTIFIED BY 'New-Password';
Example 2: mysql set password for user
# `SET PASSWORD FOR <user> = PASSWORD('<plaintext_password>')` is deprecated
SET PASSWORD FOR <user> = '<plaintext_password>';
FLUSH PRIVILEGES;