0

I want to load a large .sql file (1.5GB) but everytime it stuck on 623.9 MB with the error: MySQL server has gone away.

Running the following command: mysql -u {DB-USER-NAME} -p {DB-NAME} < {db.file.sql path}

Already changed my my.cnf file with the following values, but that did not help:

wait_timeout = 3600
max_allowed_packet = 100M
innodb_lock_wait_timeout = 2000

What am I missing here?

JGeer
  • 1,768
  • 1
  • 31
  • 75
  • 1) Did you restart the server after changes? (just a reminder). 2) Try make those values even bigger. Longer timeouts, larger packet size. 3) Try break up large queries: INSERT INTO table VALUES (a),(b),...(z) => INSERT INTO table VALUES (a),(b),...(m); INSERT INTO table VALUES (n),(o),...(z); – Jonathan Spiller Aug 20 '17 at 11:28
  • How long does it takes to receive this error? –  Aug 20 '17 at 12:35

1 Answers1

0

Refer to this link - MySQL Server has gone away when importing large sql file - for various combinations that have worked for this problem.

Wilson Hauck
  • 2,094
  • 1
  • 11
  • 19