Re: automatic table entries due to the client
> let the MYSQL DB automatically write two values
The MySQL server knows the mysql.user associated with the current connection, but has no way of knowing the application-level userID, which is a value your app must track, or her IP address, which in any case wouldn't identify the user (users may log in from anywhere).
Your app should track the app userID. To track who is making changes in tables, add inserted_by and changed_by columns to tables you need to audit, and add that info to your Insert and Update commands. For a more thorough approach to audit trails see
http://www.artfulsoftware.com/infotree/Transaction%20time%20validity%20in%20MySQL.pdf.
Subject
Written By
Posted
Re: automatic table entries due to the client
May 20, 2014 03:09PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.