0

I have this set of user accounts that I desire to create with default passwords then force the users to change passwords at first login. Plus, I wanted to force all user accounts to be resetting passwords after every 90 days. Is this supported in MySQL 5.7.x?

1 Answer 1

0

All your questions are answered in this documentation.

To force a user to reset his password use ALTER USER 'user'@'host' PASSWORD EXPIRE;.

To force an expiration date of 90 days, either use ALTER USER 'user'@'host' PASSWORD EXPIRE INTERVAL 90 DAY; for a single user, or set the variable default_password_lifetime to 90 for all users (you can exclude certain users by issuing a ALTER USER 'user'@'host' PASSWORD EXPIRE NEVER;).

1
  • For my use case, the target audience uses data analytics tools to connect to MySQL. Is there some sort of open source tool that can handle the prompt for password reset etc. without having to use the command shell? 9 hours ago

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.