Summarize a question about MySQL database

Source: Internet
Author: User

Problem Summary :MySQL Server has gone away?

This problem has to be traced back to the Nantong Software Park on business. The afternoon before work, the supervisor said it might be a business trip tomorrow, the project and the latest database back up, after the completion of the backup, but also did not care, and not sure, this is only possible, as to the possibility of how much, he did! Forgive me for being a mindset that I don't like to run my company's projects on my laptop.

At about 11 o'clock in the evening received the project manager to confirm the travel phone, specific where, how to, did not say. Just say to deploy the project to your own notebook. Have to lose their own development environment and the same company, think this should not take too long, the project into the MyEclipse, the backup of the database script import into the MySQL run. However, because the data in a company project is too big, a database script is 200+m. The script contains the database structure and the customer's business data. Many people think that the company's business data can be easily backed up, small companies, do not care too much about these small problems.

During the run of the SQL script, an error occurred: Error: (2006, ' MySQL server has gone away '). In the online search, in fact, the netizen is still more reliable. According to the reasons that the user provides the problem, since the long time to execute the batch of MySQL statements, SQL running time, insert more data, the data sent too large, the most common cause is the acquisition or conversion of old and new data. It turns out that I was right.

For simplicity, operate directly on the DOS command line.

>show global variables like '%timeout ';  >set wait_timeout=2880000;  >set interactive_timeout=2880000;  >Show global variables like ' max_allowed_packet '; >set Global max_allowed_packet=*1024x768*;

Then source D.sql, back up again, smooth resolution, no longer the above problems.

itred Blog:http://itred.cnblogs.com
GitHub:https://github.com/itRed Copyright notice: This article is copyrighted by the author and the blog Park is shared, welcome reprint, but without the author's consent must retain this paragraph of the instructions,
And in the article obvious position to give the original link, otherwise reserves the right to pursue legal responsibility.

Summarize a question about MySQL database

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.