Is there a way to (from the command line) continuously dump new rows added to a table? As a comparison, in Bash we have tail -f to 'live-dump' a file as it gains data. How could this be done for a MySQL table without a continuous loop to check for new rows?
Asked
Active
Viewed 146 times
1 Answers
1
The MySQL General Query log can be used to log all queries. If you set the following in my.cnf
log_output = TABLE
The log will write out to $mysql_data_directory/general_log.CSV Youll be able to tail this to see all the writes/new rows written.

Sirch
- 5,785
- 4
- 20
- 36
-
To clarify, I don't want to log *queries* but instead *table rows*. – Ryan Griggs Apr 06 '18 at 12:35
-
Understood. You wont get it though. The only way you're going to be able to do it (without writing something) is to tail the log file and filter out row inserts. – Sirch Apr 06 '18 at 13:00
-
OK got it. Just checking if this functionality was available. – Ryan Griggs Apr 06 '18 at 13:03