Solved

how to avoid Lock wait timeout exceeded

Posted on 2011-03-07
2
1,065 Views
Last Modified: 2012-05-11
I executed the following command which generated the error:
ERROR 1205 (HY000) at line 1: Lock wait timeout exceeded; try restarting transaction

ALTER TABLE mainDB.comment ADD FOREIGN KEY (hcId) REFERENCES mainDB.cycle (hcId);"

How to overcome this error?
0
Comment
Question by:pvinodp
2 Comments
 
LVL 20

Accepted Solution

by:
Muhammad Wasif earned 500 total points
ID: 35081290
Sometimes restarting MySQL server resolves the issue. Also look at http://harrison-fisk.blogspot.com/2009/01/xa-and-persistent-innodb-locks.html
0
 

Author Closing Comment

by:pvinodp
ID: 35163219
This worked but seems that the solution is just a hack...

Thanks  anyways
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Foreword In the years since this article was written, numerous hacking attacks have targeted password-protected web sites.  The storage of client passwords has become a subject of much discussion, some of it useful and some of it misguided.  Of cou…
All XML, All the Time; More Fun MySQL Tidbits – Dynamically Generate XML via Stored Procedure in MySQL Extensible Markup Language (XML) and database systems, a marriage we are seeing more and more of.  So the topics of parsing and manipulating XM…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now