While importing big database in MySQL, you might get the error as shown below:
ERROR 2006 (HY000) at line 3387 in file: 'path_to_the_db_dump.sql': MySQL server has gone away
Open a terminal and find a config file for MySQL by command
You will get the list of files. Open your responsible file.
If you don’t know the responsible file then open all the files ;). There is no harm to add our solution in all the related config file.
Add following line to my.cnf file.
Restart your MySQL using below command.
sudo service mysql restart OR brew services restart mysql