audit - does mysql store when users last accessed / logged into the database?

I am looking for a way to track when users login and exit the database?
is there such function built in to track and trace this ?
I don’t see any timestamp in mysql.user table and information_schema statistics table is empty

Hi thanks for your question. Here’s a blog post that covers that topic (though not with positive news):…mpts-in-mysql/ - information_schema gets cleared down after a mysqld restart.

An alternative might be Percona’s audit log plugin…og_plugin.html or the MySQL Enterprise equivalent. This writes login and logout to log files.

Would that work for you?