Change a Password for a User
To change a password for a user, you have the following options:
-
Use
GRANT
as shown in the previous section.You must have SUPER
privileges to change another user’s password. -
Use
SET PASSWORD
to 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