Error Code: 2006 – MySQL server has gone away
If you google this you will get get a few answers. But here is the solution which worked for me.
I had this problem on a windows xp machine runing mysql 4.1 on a localmachine.
Was trying to excute a large sql script. Basically insert into large amount of data for one table.
max_allowed_packet this needed to be increased. But could not find it no where in the my.ini file.
I basically copied the data from the my-large.ini file and pasted it at the being of the my.ini file and it seems to work
max_allowed_packet = 100M also made sure the max_allowed_packet was bigger than the file i was executing.