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