This issue usually encounters when max_allowed_packet has very low value than the data you submitted via query. This can be fixed by increasing max_allowed_packet variable value so it is recommended to edit this variable through /mysql/bin/my.ini (Windows) or /etc/my.cnf (Linux/UNIX) config file. It should look like as follows:
[mysqld]
max_allowed_packet = 16M
Explanation: max_allowed_packet is set to 16 Megabytes
Once, you have updated the value then restart your MySQL Server and you’re done!
That’s it!
NOTE: If you are not sure how to do this then kindly reach out to your web server administrator and ask to make this change.
Article ID: 175
Created: August 2, 2018
Last Updated: August 2, 2018
Author: Palwinder Singh [singh@phpkb.com]
Online URL: https://www.phpkb.com/kb/article/mysql-server-has-gone-away-175.html