Toggle navigation
Google Login
Yahoo Login
or
Remember
Login
Register
I forgot my password
Questions
Recent
Hot!
Most votes
Most answers
Most views
Unanswered
No answer
No selected answer
No upvoted answer
Tags
Users
Ask a Question
Cannot delete or update a parent row: a foreign key constraint fails
0
votes
Hello, I get error ERROR 1217 (23000) at line : Cannot delete or update a parent row: a foreign key constraint fails
while try importing an sql
Is there any way to fix it easily?
mysql
asked
Apr 30, 2015
by
super
(
900
points)
flag
answer
comment
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1 Answer
0
votes
Best answer
You should add these lines to your sql SET FOREIGN_KEY_CHECKS=0; to the beginning and SET FOREIGN_KEY_CHECKS=1; to the end.
following this example:
SET FOREIGN_KEY_CHECKS=0;
your queries....
Drop tables....
SET FOREIGN_KEY_CHECKS=1;
answered
Apr 30, 2015
by
vinhvinh
(
570
points)
selected
Apr 30, 2015
by
super
flag
ask related question
comment
Please
log in
or
register
to add a comment.
Welcome to Expert Customize Forum, where you can ask any IT questions and get free support by Our experts
You have projects or tasks? Want to hire Quality expert?
Try our Web expert service
Related questions
How to select and delete all content in Nano
Phpfox Server cannot handle files larger than when upload video
Most popular topics
phpfox
gameserver
plesk
joomla
htaccess
mysql
ssh
windows
monitor
wordpress
elgg
vbulletin
moosocial
phpbb
communitybuilder
buddypress
boonex
socialengine
jomsocial