Scenario: Import a SQL file, but always fail after executing dozens of sentences of SQL, open the failure log as a sentence MySQL server has gone away
I used 2 steps, but it felt like the 2nd step was successful.
1: First look at Max_allowed_packet, using the grammar for show global variables like ' max_allowed_packet ';
And then we modify this, the syntax used is
Set global max_allowed_packet=1024*1024*16; And then we look again to see if the changes were successful
2: We go to MySQL error log place to see C:\Users\Administrator\AppData\Roaming\SQLyog
There is a sqlyog.err file, I found that my previous file has more than 100 m, so I directly backed up one, and deleted the original.
Then execute the import again, it succeeds (when the import, MySQL will automatically create an empty sqlyog.err this file) ....
Parsing is possible because the log file is too large to cause read and write failures.
The workaround is to remove the original Sqlyog.err after the backup. Backup is afraid in case you need to use ...