Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using the following command to start reading mysqlbinlog.

mysqlbinlog -t -v -v --base64-output=DECODE-ROWS -h my_host -ppasswd -R mysql-bin.000960 -j 1052323996

I would expect the output to continue to the next log file, since I am using -t, but mysqlbinlog just exits.

How can I make this command continue to output log entries, like a tail -f would?

Thank you

share|improve this question

mysqlbinlog command's -t option does not work like tail command's -f option. With -t option, it will keep processing all the binary log files which currently exist. Once it reaches the end of the last binary log it will end, unless new data was written, before mysqlbinlog reached the end.

One such tool that will "follow" the binary log is mysql_binlog_dump. (I have not tried the tool myself.)

Looking at mysqlbinlog --help for MySQL 5.5, it says:

  -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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.