2

While checking the binlogs, it struck me that I cannot see any SQL statement. Here's an example:

$> sudo mysqlbinlog 
    --database=securities 
    --start-datetime='2015-11-26 13:00:00' 
    --stop-datetime='2015-11-26 14:00:00' 
    --base64-output=decode-rows 
    --verbose 
    mysql-bin.000011 

and the output

BEGIN
/*!*/;
# at 1014869455
# at 1014869609
#151126 13:00:16 server id 1  end_log_pos 1014869680    Query   thread_id=1100645   exec_time=0 error_code=0
SET TIMESTAMP=1448539216/*!*/;
COMMIT
/*!*/;
# at 1014869680
#151126 13:00:18 server id 1  end_log_pos 1014869750    Query   thread_id=1100211   exec_time=0 error_code=0
SET TIMESTAMP=1448539218/*!*/;
BEGIN
/*!*/;
# at 1014869750
# at 1014869904
#151126 13:00:18 server id 1  end_log_pos 1014869975    Query   thread_id=1100211   exec_time=0 error_code=0
SET TIMESTAMP=1448539218/*!*/;
COMMIT

However, database securities is being replicated to the slaves without any trouble. Also, what do the # at 1014869904 mean? I would have expected to see statements there.

  • # at 1014869904 -- probably the byte position in the binlog. – Rick James Dec 12 '15 at 23:04
3

Remove this clause:

--database=securities
  • Thanks, this indeed reveals the statements. From the MySQL docs: --database: List entries for just this database, but reading on, it is said that unless the database is the default one, statements won't be shown. That's just weird. – VH-NZZ Nov 27 '15 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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