I am building a spring mvc web app with a MySQL database. I need to be able to record every time a specific user creates, views, or modifies any record in the database. Then, later, I need to be able to retrieve historical access logs broken down by user, showing all of the rows that were accessed by each user, including the dates and times of each create, view, or modify operation by each user on each row.
Is there a tool that I can use to accomplish this? Or do I have to create all this by myself?
I am imagining writing a complicated "shadow application" with three data tables and then model and controller level code throughout my application. Someone must have done this before. Is this built into MySQL already? So I just setup my app to log each user into the database uniquely, and then MySQL records their activities if I configure MySQL to do so? How do I configure MySQL to do this?