Have you faced this error while importing sql file in MySql database ?

To put it simply, it is because of sql configuration in your my.ini or my.cnf file. It is configuration file for MySql database. I will be showing you how to fix the error in xampp but you can do it in other platforms as well.
Follow my steps to fix this error.
Go to xampp control panel. and click mysql database.
Click on configure.
Press open conf file to edit configuration file.
When the file is opened find max_allowed_packet
It is blocking the upload of more than 1MB of file. Lets change it to 1024M
Save the file and restart the mysql database. This is important.
Go to your phpmyadmin page. Then create a new database.
Enter database name and click create.
Go to Import
Select the file you want to import.
Scroll to bottom and press Import.
Wait for few seconds and then the file will be imported.
This is how you fix the error. If it is not fixed yet then it is the problem of apache server. Checkout this blog to see how it is fixed