Export MySQL database with foreign keys

1

My hosting uses phpMyAdmin to manage the bank and does not allow the remote connection to be a free plan.

I need to export my base to the hosting, I generated the .sql file with the command mysqldump -h host -u user -p base --routines > base.sql , but after putting the .sql file in the host, all foreign keys were lost.

Is there another way to prevent this from happening?

Thanks for the help.

    
asked by anonymous 18.01.2017 / 22:12

1 answer

2

MyISAM has no foreign keys and does not enforce referential integrity. This means that you can not pull foreign keys from your database simply because they are not even there.

    
20.01.2017 / 00:16