Account Management Statements The host name part of the role name, if omitted, defaults to  ’%’ . The clause following the  DEFAULT ROLE  keywords permits these values: SET DEFAULT ROLE  and  SET ROLE DEFAULT  are different statements: For role usage examples, see Section 6.2.10, “Using Roles” . The  SET PASSWORD  statement assigns a password to a MySQL user account. The password may be either explicitly specified in the statement or randomly generated by MySQL. The statement may also include a password-verification clause that specifies the account current password to be replaced, and a clause that manages whether an account has a secondary password.  ’ auth_string ’  and ’ current_auth_string ’  each represent a cleartext (unencrypted) password. Rather than using  SET PASSWORD  to assign passwords,  ALTER USER  is the preferred statement for account alterations, including assigning passwords. For example: Clauses for random password generation, password verification, and secondary passwords apply only to accounts that use an authentication plugin that stores credentials internally to MySQL. For accounts that use a plugin that performs authentication against a credentials system that is external to MySQL, password management must be handled externally against that system as well. For more information about internal credentials storage, see Section 6.2.15, “Password Management” . Note Note 13.7.1.10 SET PASSWORD Statement Note • NONE : Set the default to  NONE  (no roles). • ALL : Set the default to all roles granted to the account. • role  [,  role  ] ... : Set the default to the named roles, which must exist and be granted to the account at the time  SET DEFAULT ROLE  is executed. • SET DEFAULT ROLE  defines which account roles to activate by default within account sessions. • SET ROLE DEFAULT  sets the active roles within the current session to the current account default roles. SET PASSWORD [FOR  user ]  auth_option [REPLACE ’ current_auth_string ’] [RETAIN CURRENT PASSWORD] auth_option : { = ’ auth_string ’ | TO RANDOM } ALTER USER  user  IDENTIFIED BY ’ auth_string ’; 2879 SET DEFAULT ROLE ’admin’, ’developer’ TO ’joe’@’10.0.0.1’;