Implementation log_changes Mysql ... How do I save the User that I update, insert or delete the record? [closed]

1

I commented that I am making a log of changes on a table in mysql, I have the trigger that runs every time I update, insert or delete and I also have the table where I save the changes, the sentence with which I save the user which made the change is: current_user () but this statement only returns root @ localhost. My question is, there is a way to save the user that invokes the trigger, if not, they recommend me to solve my problem ... Thank you very much in advance

    
asked by Benjamin Garrido H. 20.04.2017 в 21:16
source

1 answer

0

I already came up with the solution, investigating in more depth the sentence that I must use is not current_user () but only user () and with that the user who made the action on the table saves me. Thanks for the help

    
answered by 20.04.2017 / 23:28
source