0

I have a table as an image below enter image description here

I want to delete all records which have where condition but it's error

MYSQL query

DELETE FROM `DiseaseLogs` 
WHERE `UserId` = '098935f0-ef88-11eb-9baa-e9fb6cd272ad' 
       AND `logType` = 'vaccine' 
       AND `id` NOT IN (130 , 139)

Error: #1205 - Lock wait timeout exceeded; try restarting transaction

poppy
  • 61
  • 1
  • 7
  • 1
    Does this answer your question? [How to debug Lock wait timeout exceeded on MySQL?](https://stackoverflow.com/questions/6000336/how-to-debug-lock-wait-timeout-exceeded-on-mysql) – Timothy Alexis Vass Jul 29 '21 at 08:12

1 Answers1

0

try this :

mysql->SHOW PROCESSLIST;
kill xxxx;

and kill which one in sleep. ( replace xxxx with your thread id )