How to find when the user last logged in Mysql I need to find all the users when they last logged in in mysql. My goal is to cleanup users that are not used for months. Please help
mysql hasn't such a thing.
You could force the users to change the password every 90 days and select the date, where the users didn't change their password. 

By 

SELECT User FROM mysql.user WHERE password_last_changed &lt;  NOW() - INTERVAL  3 MONTH;


Everything else would require things like enable file logs see for more information