MySQL server has gone away problem solving method

Source: Internet
Author: User

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 ...

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.