'LOCK TABLES' privilege required

1,159 views
Skip to first unread message

Ayan Mukhuty

unread,
May 27, 2021, 6:29:30 AM5/27/21
to debezium
Hi,

I have a MYSQL connector and it gives me the below error.  

ERROR :
User does not have the 'LOCK TABLES' privilege required to obtain a consistent snapshot by preventing concurrent writes to tables.\n\tat io.debezium.connector.mysql.SnapshotReader.execute(SnapshotReader.java:453)\n\t... 3 more\n"}],"type"

The user was created using the below grants as per the documentation..
GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'user' IDENTIFIED BY 'password'; 

Do I need to have LOCK TABLES privilege also to avoid this error, and is this mentioned in the documentation? 

Nidhi Garg

unread,
May 31, 2021, 9:24:03 AM5/31/21
to debezium
did u apply flush privilege command also , that will reflect your new grants to your specified user , do that and check your grants is applied or not using 
SHOW GRANTS   FOR 'user'@'ip';
Try this 

Gunnar Morling

unread,
Jun 2, 2021, 4:09:24 AM6/2/21
to debezium
Ayan,

Please see here for the privileges required by the MySQL connector:


Also see the snapshot.locking.mode property, and its value "never" in particular, if you can ensure no concurrent schema changes are happening:


Hth,

--Gunnar
Reply all
Reply to author
Forward
0 new messages