Change a Password for a User
To change a password for a user, you have the following options:
GRANTas shown in the previous section.
You must have
SUPERprivileges to change another user’s password.
SET PASSWORDto create a password hash and assign it to the user.
Users can also change their own password with this command.SET PASSWORD FOR 'username'@'host' = PASSWORD('password');
Last modified: January 20, 2023