Watch the 7.3 Webinar On-Demand
This new release brings updates to Universal Storage, query optimization, and usability that you won’t want to miss.

SET PASSWORD

Sets a user’s password.

Syntax

SET PASSWORD FOR 'username'@'host' = PASSWORD('password')

Remarks

  • 'password' is a clear-text password. The PASSWORD function creates a hash of the clear-text password and assigns it to the user.
  • This command allows users to change their own password. You can change another user’s password with this command if you have SUPER privileges.
  • This command only changes the user’s password for that specific node, not for every node in the cluster.
Info

Once the password is changed, it cannot be viewed.

Examples

SET PASSWORD FOR 'joe'@'%' = PASSWORD('securePass');