Load SQL File

[expired user #10923]'s profile image [expired user #10923] posted 7 years ago in General Permalink

Hi there,

Today i tried to Load SQL File sized 1GB, actually it's backup file i created from mysqldump, I usually using MySQLFront and it's loading the file fine and smoothly, When i load the SQL file, the error window pop up "SQL Error (2006): MySQL server has gone awayNotice: You can disable the "Stop on errors in batch mode" option to ignore such errors".

I've checked, the MySQL Server is still running fine, and i don't find "stop on errors in batch mode" in option menu.

Any help?

ansgar's profile image ansgar posted 7 years ago Permalink

Unfortunately, "server has gone away" will stop the whole import, as the connection is disabled then. Most common cause is that the SQL file contains some huge "INSERT INTO ... VALUES (...), (...), (...), ..." query package, while your server accepts less than this size.

Increasing the server variable "max_allowed_package" before importing can fix this problem:

SET @@global.max_allowed_packet = 104857600; -- 100M
endo64's profile image endo64 posted 7 years ago Permalink

I also faced "MySQL server has gone away" error while importing an SQL that has 2 VIRTUAL columns and the second column refers to the first one. If that is the case then MySQL crashes and "MySQL server has gone away" error happens.

Note that it is not an HeidiSQL issue but a MySQL issue.

MarekOlszewski's profile image MarekOlszewski posted 2 years ago Permalink

Hi! I want to connect to this topic. I'm trying to import SQL file created in older HeidiSQL version (9.x) Heidi is stopping with message as above: You can disable the "Stop on errors in batch mode" But, I didn't find this option anywhere in the application. Can anybody help me?

Best regards, Marek

ansgar's profile image ansgar posted 2 years ago Permalink

That is the button with the yellow warning sign in the main toolbar:

Description

MarekOlszewski's profile image MarekOlszewski posted 2 years ago Permalink

many thanks! You're great!

Please login to leave a reply, or register at first.