Get Events of a particular table

71 views
Skip to first unread message

NAYAN KHANNA

unread,
Aug 22, 2019, 3:56:41 PM8/22/19
to Python MySQL replication
How can I use BinLogStreamReader to extract logs of just a single table of a database? Also, to have the file running in the terminal and printing realtime the newer changes until it is manually closed. Please let me know how can I achieve these.

Thanks in Advance

Harshad Ambekar

unread,
Sep 5, 2019, 3:07:14 AM9/5/19
to Python MySQL replication
For your first question, I believe you can setup a configuration by passing your table(s)


stream = BinLogStreamReader(connection_settings= MYSQL_SETTINGS,
server_id=1,
blocking=True,
resume_stream=True,
only_schemas="123",
only_tables="employee"
Reply all
Reply to author
Forward
0 new messages