Good morning,
I need to register all the changes in the database, such as UPDATE, INSERT and etc »I suggest you do this on your own, create a log
or similar table with the desired information like date and time, description, operation performed and which user. I've been doing this for a number of years and the logs have already saved me from typical situations like "customer X has gone ..."
Now, so that I can restore the last backup and run the queries from the last backup seems much more complicated. I suggest you schedule backup dumps every hour, or at ideal frequency, and have these dumps as a restore option.
But is it possible to delete unwanted queries and open the log file in a friendly way for editing? »I may be wrong, but reading so seems like a" magic solution "to solve a situation very complex. I would try with the backup dumps and, if necessary, have the queries in the log table and run them in a maintenance routine. But again, I would implement this via programming, for example in PHP.
I consider it potentially dangerous to manually edit backup SQLs before doing a restore, I try to avoid this approach.
Good luck!