pythonmysqlbinlog

Binlog have event but no rows?


I am working with a project, i need to watch binlog event, iterator rows, and do something.In my local enviroment ,I tested my codes and everything worked,I can get events and rows in each event.However, after moved to production-enviroment and connected to another database,I can only get bingo event,but there were no rows in any events. I used python-mysql-replication,i dumped all binlog-event i received,each of them in like below:

=== UpdateRowsEvent ===
Date: 2018-06-27T15:46:33
Log position: 326768636
Event size: 87
Read bytes: 15
Table: db_xxx.t_yyy
Affected columns: 13
Changed rows: 0
Affected columns: 13
Values:

As U see,changed rows is 0,and values are empty!


Solution

  • I find the solution, it is because has no grant for select on table.