MySQL Error 1205: Lock wait timeout exceeded

天涯浪子 提交于 2019-12-06 09:59:01

问题


I'm using SQLyog to sync a production database to a dev db. On 4 tables, I'm getting:

Error No. 1205 Lock wait timeout exceeded; try restarting transaction

Researching the web seems to indicate that a transaction has begun, locked tables, but has not committed. One post said to SHOW PROCESSLIST; but the only processes appear to be my own, via SQLyog.

I have also tried a Restart of MySQL, but that didn't help either.

As a relative novice in MySQL, I'm stuck: I can't determine what transaction or process is locking the tables, nor how to clear this situation.

Any suggestions would be gratefully accepted!

MTIA


回答1:


Having the same problem on MySQL-cluster, I've solved (at least it looks being solved now - no fail have occured during last two days) it by performing commit/rollback after SELECTs too.




回答2:


Export and re-import your database; this can often fix a lot of mysterious problems. You can do this through phpMyAdmin or from the command line.

This page at MediaTemple has a good set of instructions: http://kb.mediatemple.net/questions/129/Export+and+import+MySQL+databases#gs

(Well, it worked for me!)



来源:https://stackoverflow.com/questions/2383694/mysql-error-1205-lock-wait-timeout-exceeded

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!