Is there an audit trail aka change log for DB?


#1

Is there a way to enable an audit trail for DB changes? That is, I want to know when a db record was changed and who was the user who changed it. I know about enabling “ON UPDATE CURRENT_TIMESTAMP” but that doesn’t tell me who the user was.


#2

Not automatically. You’d have to code your application to keep track of that.


#3

When you are logging user activities, please keep your table as simple as you can. Please make sure it will be fast to insert a record into the table otherwise it will be an overhead to your application.