Sample Header Ad - 728x90

How to log queries to a selected table in MySql

1 vote
2 answers
79 views
I want to log queries to just one table. I have found these
SET GLOBAL log_output = "FILE"; which is set by default.
SET GLOBAL general_log_file = "/path/to/your/logfile.log";
SET GLOBAL general_log = 'ON';
However this logs all queries. There are questions on SO, but they are for total logging. [How to show the last queries executed on MySQL?](https://stackoverflow.com/questions/650238/how-to-show-the-last-queries-executed-on-mysql) [Log all queries in mysql](https://stackoverflow.com/questions/303994/log-all-queries-in-mysql)
Asked by Rohit Gupta (2122 rep)
Feb 21, 2025, 04:11 PM
Last activity: Feb 24, 2025, 08:27 PM