ALTER USER ’jeffrey’@’localhost’ PASSWORD REUSE INTERVAL DEFAULT; 

• PASSWORD REUSE INTERVAL N  DAY 

This time-elapsed option overrides the global policy for all accounts named by the statement. For each, it sets the password reuse interval to N  days, to prohibit reuse of passwords newer than that many days. The following statement prohibits password reuse for 360 days: 

ALTER USER ’jeffrey’@’localhost’ PASSWORD REUSE INTERVAL 360 DAY; 

ALTER USER  permits these password_option  values for controlling whether attempts to change an account password must specify the current password, as verification that the user attempting to make the change actually knows the current password: 

• PASSWORD REQUIRE CURRENT 

This verification option overrides the global policy for all accounts named by the statement. For each, it requires that password changes specify the current password. 

ALTER USER ’jeffrey’@’localhost’ PASSWORD REQUIRE CURRENT; 

• PASSWORD REQUIRE CURRENT OPTIONAL 

This verification option overrides the global policy for all accounts named by the statement. For each, it does not require that password changes specify the current password. (The current password may but need not be given.) 

ALTER USER ’jeffrey’@’localhost’ PASSWORD REQUIRE CURRENT OPTIONAL; 

• PASSWORD REQUIRE CURRENT DEFAULT 

Sets all statements named by the account so that the global policy about password verification applies, as specified by the password_require_current  system variable. 

ALTER USER ’jeffrey’@’localhost’ PASSWORD REQUIRE CURRENT DEFAULT; 

As of MySQL 8.0.19, ALTER USER  permits these password_option  values for controlling failed-login tracking: 

• FAILED_LOGIN_ATTEMPTS N 

Whether to track account login attempts that specify an incorrect password. N  must be a number from 0 to 32767. A value of 0 disables failed-login tracking. Values greater than 0 indicate how many consecutive password failures cause temporary account locking (if PASSWORD_LOCK_TIME  is also nonzero). 

• PASSWORD_LOCK_TIME { N  | UNBOUNDED} 

How long to lock the account after too many consecutive login attempts provide an incorrect password. N  must be a number from 0 to 32767, or UNBOUNDED . A value of 0 disables temporary account locking. Values greater than 0 indicate how long to lock the account in days. A value of UNBOUNDED  causes the account locking duration to be unbounded; once locked, the account remains in a locked state until unlocked. For information about the conditions under which unlocking occurs, see Failed-Login Tracking and Temporary Account Locking. 

For failed-login tracking and temporary locking to occur, an account’s FAILED_LOGIN_ATTEMPTS  and PASSWORD_LOCK_TIME  options both must be nonzero. The following statement modifies an account such that it remains locked for two days after four consecutive password failures: 

