Questions tagged [mysqlbinlog]

mysqlbinlog is a MySQL Utility for Processing Binary Log Files

mysqlbinlog is a MySQL Utility for Processing Binary Log Files

The server's binary log consists of files containing “events” that describe modifications to database contents. The server writes these files in binary format. To display their contents in text format, use the mysqlbinlog utility

Docs: https://dev.mysql.com/doc/refman/5.7/en/mysqlbinlog.html

MariaDB Docs: https://mariadb.com/kb/en/library/using-mysqlbinlog/

134 questions
13
votes
3 answers

Can I use mysql binlog from master as relay log on slave?

I have following Mysql replication schema: A(master)->B(slave/master)->C(slave) A writes binlog B reads A's binlog applies relaylog and writes it's own binlog C reads from B and applies. If replication become broken by some reason (A->B) can I…
tamerlaha
  • 1,902
  • 1
  • 17
  • 25
13
votes
1 answer

MySQL Replication fails with error "Could not parse relay log event entry."

I've searched google thoroughly for a definitive solution or set of steps to resolve this issue, but there don't seem to be many high quality results, and I haven't found the question on stack overflow. We're trying to set up MySQL replication using…
nolliecrook
  • 131
  • 1
  • 1
  • 4
7
votes
0 answers

How to filter output of "SHOW BINLOG EVENTS"

Without talking about master/slave replication, I just want to customize which entries I see when querying the MySQL Binary-Logs with SHOW BINLOG EVENTS. Already tried to find the same information in information_schema and performance_schema so that…
AdrienW
  • 3,092
  • 6
  • 29
  • 59
7
votes
4 answers

Searching MySQL Bin Log for a Query

Is it possible to query the mysql bin log for a particular query? For example, suppose I want to know if anyone in the last hour did a specific query (like 'Update tableX where userName = 'bob'"). I just want to see if a particular query has been…
David
  • 407
  • 3
  • 8
  • 13
6
votes
2 answers

Error: Binlogging on server not active when setting up Master Slave replication on one machine

I am trying to set up Master Slave Replication on my local machine using this tutorial. I am close to the end but when I try to run mysqldump using the --master-data=2 I get an error mysqldump: Error: Binlogging on server not active All the…
Chris Starling
  • 422
  • 6
  • 20
5
votes
1 answer

Near real-time ETL from MySQL to Redshift

I'm trying to figure out most efficient way to extract data from MySQL, transform it and load to Redshift in near real-time. Currently we have overnight ETL process (using Pentaho) which last ~ 40min and we want to replace it with near real-time…
5
votes
5 answers

How to read a mysql binlog

I want to write a service to tail the mysql bin log to get notifications about database changes. Is there an open source library that reads and parses mysql bin log in ROW format?
user4930867
  • 73
  • 1
  • 1
  • 5
5
votes
1 answer

mysqld: File '/var/log/mysql/mysql-bin.index' not found (Errcode: 13)

I faced with this error after trying to restart MySQL server. root@private:/# mysqld_safe 140618 03:56:53 mysqld_safe Can't log to error log and syslog at the same time. Remove all --log-error configuration options for --syslog to take…
dongpt
  • 51
  • 1
  • 1
  • 4
5
votes
2 answers

Mysql binlog path from mysql console

Is there a way to know the bin log files path from mysql console as we can know whether its ON or OFF by using Select * information_schema.GLOBAL_VARIABLES where variable_name like '%log_bin%'.
Kotesh Malempati
  • 103
  • 2
  • 2
  • 9
4
votes
1 answer

Mysql - Replicate only a few tables from a database

Using mysql replication with mysqlbinlogs between master and slave databases, is it possible to only replicate a few key tables instead of an entire database? I would ideally like to not even generate the mysqlbinlogs for the unneeded tables If…
LTME
  • 1,086
  • 1
  • 10
  • 13
4
votes
2 answers

MongoDB Change Stream: Can I get value before update/delete?

Change Stream Event on an update operation just return the document that changes to, same as oplog. Can I get the document (or some updated values) before update? MySQL row-based binlog can do this with full binlog_row_image.
auntyellow
  • 2,423
  • 2
  • 20
  • 47
4
votes
4 answers

Delete mysql-bin.**** files from /var/log/mysql

In the /var/log/mysql I found that are many large files -rw-rw---- 1 mysql adm 104875724 Nov 16 2016 mysql-bin.002982 -rw-rw---- 1 mysql adm 104900467 Nov 16 2016 mysql-bin.002983 ............... -rw-rw---- 1 mysql adm 104919093 Nov…
Mohamed Ben HEnda
  • 2,686
  • 1
  • 30
  • 44
4
votes
2 answers

Is there any tool available to parse mysql binlog file in row format and create json

I have mysql binlog enabled in row format. I am using mysqlbinlog to parse binlog file. I am using this command: mysqlbinlog --base64-output=decode-rows -vv ./mysql-bin.000004 This command returns sql statements that I have to parse to generate…
Branel Moro
  • 132
  • 2
  • 9
4
votes
1 answer

MySQL - max_binlog_cache_size vs binlog_cache_size

There is quite a lot of confusion in the description of these variables, in official documentation of MySQL. According to it, max_binlog_cache_size means, If a transaction requires more than this many bytes of memory, the server generates a…
Yashwanth Aluru
  • 1,125
  • 6
  • 21
  • 28
3
votes
1 answer

Restoring purged mysql binlog files

I've got a replication set up on pair of servers. One is a master and second is a slave. Recently on master the binlog files were purged too early (by filename so mysql haven't prevented too early removal of file). Now the SLAVE has status: Got…
kaczor1984
  • 467
  • 2
  • 12
  • 22
1
2 3
8 9