Loggin all selects only for one table

Hi, i want to know if is possible create a log that catch all selects that are execute only in a table… i found this but i don’t get any information.

sudo tcpdump -s 65535 -x -nn -q -tttt -i any -c 1000 port 3306 | pt-query-digest --type tcpdump --run-time 5s --iterations 0 --filter ‘$event->{fingerprint} =~ m/\b(from|join|into)\s+(?my_database?.)?(table_one|table_two|)?\b/’ --output slowlog --no-report > mylog.txt

Best!

Hi,

I would use pt-kill with --print and --match-info.

Regards

Hi but i understand that pt-kill is for cancel or kill the queries… that is rigth? but i need is log all queries launched in only a table for not use the global log of mysql…

pt-kill only kill queries if you specify --kill. Using --print only it won’t kill any query