2

I have a simple query in the database

UPDATE users SET username = 'test' WHERE id = '3'

After that, the request hangs for 120 seconds and show the error "Lock wait timeout exceeded; try restarting transaction" appears. This applies to only one user, in all other cases everything is fine.

I executed the command show full processlist and Kill all updates that have been locked and again executed this update and still the same.

How can I unlock it?

Игорь
  • 21
  • 2
  • Are you executing any other queries on the database at the same time? This normally happens when two queries try to update the same thing, etc, so MySQL just deadlocks one and times it out. Did you try searching Google for the error message? https://stackoverflow.com/questions/5836623/getting-lock-wait-timeout-exceeded-try-restarting-transaction-even-though-im – Toastrackenigma Aug 05 '17 at 22:11
  • No, only once. I already tried everything. Only one thing helps, it's a mysql restart, but not for a long time... – Игорь Aug 05 '17 at 22:43
  • You said you had other MySQL users that the query worked for? Compare their permissions to the one that doesn't work, and tell us what difference between them is. – Toastrackenigma Aug 05 '17 at 22:46

0 Answers0