Solved

how to avoid Lock wait timeout exceeded

Posted on 2011-03-07
2
1,068 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Display multiple images in the row in PHP 11 77
Mysql not caching queries 4 64
How to restrict access to pages but still have my content indexed by Google? 4 127
join tables 4 51
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

896 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

14 Experts available now in Live!

Get 1:1 Help Now