I'm using phpMyAdmin, and I'm attempting to duplicate the database from one database to another (on my dev machine). I get the following error:
#1452 - Cannot add or update a child row: a foreign key constraint fails
Behind the scenes, PMA appears to be doing a INSERT INTO ... SELECT
query.
Is there a way to get PMA to copy this database properly? Or, is there a better tool for working with MySQL that I should be using (preferably GUI based)?
Export the original DB, then import it to new DB - the SQL created in the export will have a "disable keys" directive, that will lift you over the hurdle.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With