How to Drop a Foreign Key in MySQL
To remove (drop) a foreign key constraint in MySQL use the following command:
If you do not know the name of the constraint, then use the command below:
It is possible that MySQL complains that the foreign key (index) is needed by some other constraint. This can be solved by first creating an index that is equal to to foreign key index. To know which fields to add to that index, use the SHOW CREATE TABLE command from above.