我使用以下命令开始读取mysqlbinlog。
mysqlbinlog -t -v -v --base64-output=DECODE-ROWS -h my_host -ppasswd -R mysql-bin.000960 -j 1052323996我希望输出继续到下一个日志文件,因为我使用的是-t,但是mysqlbinlog只是退出。
如何使此命令像tail -f那样继续输出日志条目?
谢谢
发布于 2013-01-31 22:46:54
mysqlbinlog命令的-t选项不像tail命令的-f选项那样工作。使用-t选项,它将继续处理当前存在的所有二进制日志文件。一旦到达最后一个二进制日志的末尾,除非在mysqlbinlog结束之前写入了新的数据,否则它将结束。
其中一个将“跟踪”二进制日志的工具是mysql_联木_转储。(我自己还没有试过这个工具。)
看看mysqlbinlog --help for MySQL 5.5,它说:
-t, --to-last-log Requires -R. Will not stop at the end of the requested
binlog but rather continue printing until the end of the
last binlog of the MySQL server. If you send the output
to the same MySQL server, that may lead to an endless
loop.https://serverfault.com/questions/411036
复制相似问题