You could do this with triggers although you'd have some trouble with HOST,APP,MODULE unless you identify those by a specific MariaDB user.

 

You could compare the OLD.COLUMN and NEW.COLUMN values to determine which columns have changed although more traditional usage would be to log the entire changed row.

 

There's some discussion of it hereā€¦

 

http://stackoverflow.com/questions/12563706/is-there-a-mysql-option-feature-to-track-history-of-changes-to-records

 

If your needs are simple I'd stick with that. There are some Data Change Capture tool, linked Databus and Flexviews (has some type of DCC capability).

 

Cheers,

 

Rhys

 

From: Maria-discuss [mailto:maria-discuss-bounces+rhys.campbell=swisscom.com@lists.launchpad.net] On Behalf Of Karthick Subramanian
Sent: Wednesday, September 07, 2016 6:59 PM
To: Maria Discuss <maria-discuss@lists.launchpad.net>
Subject: [Maria-discuss] Reg Audit Trail Implementation

 

All,

 

Before I reinvent a wheel again, thought of checking with you experts whether any recommendation or suggestion for implementing audit trail feature for your database. I am looking for any open source product/tool for this purpose. 

 

I thought of exploring audit plugin, but I am not sure whether we can enable audit trail for the data changes in a tables. For example:

 

ORDER table:

ORDER_ID

PRODUCT_ID

QTY

ORDER_DATE

SHIP_DATE

DELIVERY_DATE

DELIVERY_ADDRESS

 

Any changes on the above table's data (rows), we need to capture the audit trail like TABLE_NAME,COLUMN_NAME,OLD_VALUE,NEW_VALUE,CHANGE_DATE,CHANGE_BY,HOST,APP,MODULE etc. 

 

Thank you,

Karthick