MySQL Forums
Forum List  »  InnoDB

Re: Bogus ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails
Posted by: JD Brennan
Date: February 26, 2008 05:02PM

I found the problem. First I added:

set-variable = lower_case_table_names=0

to /etc/my.cnf and restarted mysqld.

I had moved from Windows to Linux, and
the mysqldump on Windows downcased all
the table names in the foreign key
definitions. So I did some post-processing
on the mysqldump file to upcase the table names,
the recreated the database from the dump file
and everything is working now.

JD



Edited 1 time(s). Last edit at 02/29/2008 06:13PM by JD Brennan.

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Bogus ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails
5463
February 26, 2008 05:02PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.