1ALTER USER 'user-name'@'localhost' IDENTIFIED BY 'NEW_USER_PASSWORD';FLUSH PRIVILEGES;
1SET PASSWORD FOR 'user-name'@'localhost' = PASSWORD('NEW_USER_PASSWORD');FLUSH PRIVILEGES;
1-- In case the UPDATE command returns "Column 'Password' is not updatable" run
2ALTER USER 'root'@'localhost' IDENTIFIED BY 'newPassword';
3flush privileges;
1# `SET PASSWORD FOR <user> = PASSWORD('<plaintext_password>')` is deprecated
2SET PASSWORD FOR <user> = '<plaintext_password>';
3FLUSH PRIVILEGES;
1UPDATE mysql.user SET authentication_string = PASSWORD('NEW_USER_PASSWORD')WHERE User = 'user-name' AND Host = 'localhost';FLUSH PRIVILEGES;CopyCopyCopied!