MySQL – How to Check if User’s Password Has Expired

authenticationMySQLmysql-8.0users

How can I find out if a user's password has expired in MySQL?

The MySQL version I'm using is 8.0.16.

Best Answer

This information, along with other user properties, is found in the user table in the mysql schema (database). The value 'Y' would indicate an expired password

select password_expired from mysql.user where user = 'whatever'