I'm looking to improve the security of my MariaDB installation by better auditing the user accounts and the privileges of each user account.
This database is being provided as a service out to many other users within the enterprise, and in some cases people leave the company or didn't actually need the level of privileges they requested. I'd like to audit the user accounts and see when they last logged in (to make sure users are logging in at least once every 90 days) and auditing the privileges their account has been granted.
Specifically, if possible, I'd like to look which privileges haven't been used within the past 90 days so that I can either alert our service team or (in the future) automatically revoke privileges which are not being used (with the exception of some of the disaster recovery accounts or security teams).
Any guidance on how to proceed with identifying account usage either in the general account access or in the more detailed privilege usage would be greatly appreciated.