Details
-
Bug
-
Resolution: Not a Bug
-
Blocker
-
None
-
1.5.4.Final
-
None
-
False
-
None
-
False
-
Important
Description
Bug report
I run debezium engine with an flink job.
Caused by: io.debezium.DebeziumException: io.debezium.DebeziumException: User does not have the 'LOCK TABLES' privilege required to obtain a consistent snapshot by preventing concurrent writes to tables.
at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:82)
at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:110)
... 5 more
Caused by: io.debezium.DebeziumException: User does not have the 'LOCK TABLES' privilege required to obtain a consistent snapshot by preventing concurrent writes to tables.
at io.debezium.connector.mysql.MySqlSnapshotChangeEventSource.tableLock(MySqlSnapshotChangeEventSource.java:531)
at io.debezium.connector.mysql.MySqlSnapshotChangeEventSource.readTableStructure(MySqlSnapshotChangeEventSource.java:310)
at io.debezium.relational.RelationalSnapshotChangeEventSource.doExecute(RelationalSnapshotChangeEventSource.java:122)
at io.debezium.pipeline.source.AbstractSnapshotChangeEventSource.execute(AbstractSnapshotChangeEventSource.java:71)
... 6 more
What Debezium connector do you use and what version?
debezium-connector-mysql: 1.5.4-Final
What is the captured database version and mode of depoyment?
mysql: 5.6.51-log
What behaviour do you expect?
No exception throwing
What behaviour do you see?
debezium require 'LOCK TABLES' privilege
Do you see the same behaviour using the latest relesead Debezium version?
Not yet, but I find that the relevant code is the same
Do you have the connector logs, ideally from start till finish?
Implementation ideas (optional)
debezium/MySqlSnapshotChangeEventSource.java at main · debezium/debezium (github.com)
I think this line of code caused the error. Debezium need to verify whether the user has 'RELOAD' privilege, not 'LOCK TABLE' privilege