Barry Chapman
Barry Chapman

Reputation: 6780

Executing a 120mb insert statement

I am trying to run an INSERT statement (from a file.sql - in relation to my post [ How do I load a local .SQL file into MySQL? ]) however the INSERT statement takes up the whole file. It is a single insert statement that is about 120mb in size.

I keep getting this error when running the following command:

Command: mysql -u username -p database < import.sql Error: ERROR 2013 (HY000) at line 28: Lost connection to MySQL server during query

I have no idea how to make this work. I have tried adjusting the max packet size values, still no luck.

Upvotes: 0

Views: 271

Answers (1)

Jim Garrison
Jim Garrison

Reputation: 86754

You need to increase the max_allowed_packet parameter on the server. See this link for information.

Upvotes: 2

Related Questions