Password Management After the client resets the password, the server restores normal access for the session, as well as for subsequent connections that use the account. It is also possible for an administrative user to reset the account password, but any existing restricted sessions for that account remain restricted. A client using the account must disconnect and reconnect before statements can be executed successfully. mysql>  SELECT 1; +---+ | 1 | +---+ | 1 | +---+ 1 row in set (0.00 sec) Note Password Reuse Policy Although it is possible to “reset”  an expired password by setting it to its current value, it is preferable, as a matter of good policy, to choose a different password. DBAs can enforce non-reuse by establishing an appropriate password-reuse policy. See Password Reuse Policy. MySQL enables restrictions to be placed on reuse of previous passwords. Reuse restrictions can be established based on number of password changes, time elapsed, or both. Reuse policy can be established globally, and individual accounts can be set to either defer to the global policy or override the global policy with specific per-account behavior. The password history for an account consists of passwords it has been assigned in the past. MySQL can restrict new passwords from being chosen from this history: •If an account is restricted on the basis of number of password changes, a new password cannot be chosen from a specified number of the most recent passwords. For example, if the minimum number of password changes is set to 3, a new password cannot be the same as any of the most recent 3 passwords. •If an account is restricted based on time elapsed, a new password cannot be chosen from passwords in the history that are newer than a specified number of days. For example, if the password reuse interval is set to 60, a new password must not be among those previously chosen within the last 60 days. •To prohibit reusing any of the last 6 passwords or passwords newer than 365 days, put these lines in the server  my.cnf  file: •To set and persist the variables at runtime, use statements like this: The empty password does not count in the password history and is subject to reuse at any time. To establish password-reuse policy globally, use the  password_history  and password_reuse_interval  system variables. Examples: Note SET PERSIST password_history = 6; [mysqld] password_history=6 password_reuse_interval=365 1248