1

I am trying to import an 11.1 GB .sql file that was sent to me by a colleague. It was created through mysqldump, and I am attempting to import it. When I do import it, I always get the "MySQL server has gone away" error after about one hour. The server is local (run by my machine), and the file is local as well. I am on OS X

  • When importing, the activity monitor shows that mysql is only using around 1-2% of the cpu and about 4MB of real memory
  • My understanding is that mysql uses default values on macs, and the default timeout time is 8 hours. This error pops up well before 8 hours
  • I have increased the max allowed packet size to 100mb and am currently running it with a 1G packet size

I have done some looking around, but don't see much. Most people suggest fixing the packet size or the timeout wait. What type of packet size should be considered reasonable?

edit: The max allowed packet size of 1G did not work.

neelshiv
  • 6,125
  • 6
  • 21
  • 35

1 Answers1

1

Is it possible to make dump again? If 'yes', so you can pass --max-allowed-packet option to mysqldump utility.

To make import faster you can dump database per table and import them in parallel. Do you not forget to turn off foreign key checking in case.

ravnur
  • 2,772
  • 19
  • 28
  • What does the max-allowed-packet option do while dumping? I think it would be possible to dump it again. Dumping each table separately also seems like it might help, if we go down that road. – neelshiv Nov 14 '13 at 23:02
  • it splits inserts to fit client's `max-allowed-packet` – ravnur Nov 15 '13 at 06:57