Question : MySQL 5 DROP error -> foreign key constraint

Hi Experts,

I am trying to clear out a bunch of innoDB tables from a joomla site.  They came from the civiCRM module.  After getting rid of them I intend to restore the tables from a backup.  But I can't restore or remove them because the 'DROP' command fails because of numerous foreign key constraints.  I can't seem to turn off foreign key 'checking' in PHPMySQL with myhosting.com.  So, besides using ALTER on each individual  table (there are dozens) is there some fast way to remove these tables?  

Thanks!

HNM

Answer : MySQL 5 DROP error -> foreign key constraint

This would take care of the issue which you are facing..
1:
2:
3:
4:
5:
SET foreign_key_checks = 0;

## Run your drop commands here

SET foreign_key_checks = 1;
Random Solutions  
 
programming4us programming4us