DBAs can enforce non-reuse by establishing an appropriate password-reuse policy. See Password Reuse Policy. 

ALTER USER  permits these password_option  values for controlling password expiration: 

• PASSWORD EXPIRE 

Immediately marks the password expired for all accounts named by the statement. 

ALTER USER ’jeffrey’@’localhost’ PASSWORD EXPIRE; 

• PASSWORD EXPIRE DEFAULT 

Sets all accounts named by the statement so that the global expiration policy applies, as specified by the default_password_lifetime  system variable. 

ALTER USER ’jeffrey’@’localhost’ PASSWORD EXPIRE DEFAULT; 

• PASSWORD EXPIRE NEVER 

This expiration option overrides the global policy for all accounts named by the statement. For each, it disables password expiration so that the password never expires. 

ALTER USER ’jeffrey’@’localhost’ PASSWORD EXPIRE NEVER; 

• PASSWORD EXPIRE INTERVAL N  DAY 

This expiration option overrides the global policy for all accounts named by the statement. For each, it sets the password lifetime to N  days. The following statement requires the password to be changed every 180 days: 

ALTER USER ’jeffrey’@’localhost’ PASSWORD EXPIRE INTERVAL 180 DAY; 

ALTER USER  permits these password_option  values for controlling reuse of previous passwords based on required minimum number of password changes: 

• PASSWORD HISTORY DEFAULT 

Sets all accounts named by the statement so that the global policy about password history length applies, to prohibit reuse of passwords before the number of changes specified by the password_history  system variable. 

ALTER USER ’jeffrey’@’localhost’ PASSWORD HISTORY DEFAULT; 

• PASSWORD HISTORY N 

This history-length option overrides the global policy for all accounts named by the statement. For each, it sets the password history length to N  passwords, to prohibit reusing any of the N  most recently chosen passwords. The following statement prohibits reuse of any of the previous 6 passwords: 

ALTER USER ’jeffrey’@’localhost’ PASSWORD HISTORY 6; 

ALTER USER  permits these password_option  values for controlling reuse of previous passwords based on time elapsed: 

• PASSWORD REUSE INTERVAL DEFAULT 

Sets all statements named by the account so that the global policy about time elapsed applies, to prohibit reuse of passwords newer than the number of days specified by the password_reuse_interval  system variable. 

