Account Management Statements SELECT CURRENT_USER(); •For  DEFAULT ROLE  syntax,  ALTER USER  requires these privileges: •Setting the default roles for another user requires the global  CREATE USER  privilege, or the  UPDATE privilege for the  mysql.default_roles  system table. •Setting the default roles for yourself requires no special privileges, as long as the roles you want as the default have been granted to you. •Statements that modify secondary passwords require these privileges: •The  APPLICATION_PASSWORD_ADMIN  privilege is required to use the  RETAIN CURRENT PASSWORD or  DISCARD OLD PASSWORD  clause for  ALTER USER  statements that apply to your own account. The privilege is required to manipulate your own secondary password because most users require only one password. •If an account is to be permitted to manipulate secondary passwords for all accounts, it requires the CREATE USER  privilege rather than  APPLICATION_PASSWORD_ADMIN . When the  read_only  system variable is enabled,  ALTER USER  additionally requires the CONNECTION_ADMIN  privilege (or the deprecated  SUPER  privilege). By default, an error occurs if you try to modify a user that does not exist. If the  IF EXISTS  clause is given, the statement produces a warning for each named user that does not exist, rather than an error. Important Under some circumstances,  ALTER USER  may be recorded in server logs or on the client side in a history file such as  ~/.mysql_history , which means that cleartext passwords may be read by anyone having read access to that information. For information about the conditions under which this occurs for the server logs and how to control it, see Section 6.1.2.3, “Passwords and Logging” . For similar information about client-side logging, see Section 4.5.1.3, “mysql Client Logging” . There are several aspects to the  ALTER USER  statement, described under the following topics: •ALTER USER Overview •ALTER USER Authentication Options •ALTER USER Role Options •ALTER USER SSL/TLS Options •ALTER USER Resource-Limit Options •ALTER USER Password-Management Options •ALTER USER Account-Locking Options •ALTER USER Binary Logging For each affected account,  ALTER USER  modifies the corresponding row in the  mysql.user  system table to reflect the properties specified in the statement. Unspecified properties retain their current values. ALTER USER Overview 2836