Question: We can import any heavy database into phpmyadmin from command prompt. But many tables have foreign key and it is not allowed to insert a table having foreign key. So how to remove or disable foreign key in order to import database in phpmyadmin?

Answer: 
Ya, we can set foreign key check as disable before importing database into phpmyadmin.

What we need to do is, edit that database file i.e. yourdatabase.sql and add 2 lines in it.

1) Add in just beginning of database file

```
SET FOREIGN_KEY_CHECKS = 0;
```

2) Just before end of file at last line of file.

```
SET FOREIGN_KEY_CHECKS = 1;
```

First it will disable foreign key checks and in the end, it will enable it again.
GO to export in in phpmyadmin follow below step.

[![enter image description here](https://i.stack.imgur.com/vuEB4.png)](https://i.stack.imgur.com/vuEB4.png)

[![enter image description here](https://i.stack.imgur.com/HWJhN.png)](https://i.stack.imgur.com/HWJhN.png)