you can’t tail -f a mysqlbinlog, but something like this give the same result 🙂
# watch "mysqlbinlog /var/log/mysql/mysql-bin.004436 | tail"
you can’t tail -f a mysqlbinlog, but something like this give the same result 🙂
# watch "mysqlbinlog /var/log/mysql/mysql-bin.004436 | tail"
Just tried this and it worked! And made me smile 🙂 Thanks for the tip.
glad to help 🙂
This is very unfriendly for the system, as mysqlbinlog will read the complete binary file, only to display the last 10 lines with tail. And then every 2 seconds repeat;
If you want poor mans tailing of the binary log, use the strings tool:
`tail -f binary-log | strings` – it will display all the strings that are stored into the binary log. If you want to look for some query markers, this is slightly better: `tail -f binary-log | strings | egrep -i ‘(insert|update|delete|replace)’`
yep, definitely unfriendly for the system ! your tip works like a charm .
Thnx for sharing ! 🙂