MySQL Import data is error: 2006-mysql server has gone away

Source: Internet
Author: User
Tags bulk insert mysql import

SQL database structure + data, if the data is bulk INSERT will be error: 2006-mysql server has gone away.

Workaround: Locate the My.ini configuration file in your MySQL directory and add the following code

max_allowed_packet=500m

wait_timeout=288000

Interactive_timeout = 288000

You can change the value of your own, and finally remember to restart your MySQL service.

This will be a good solution to the MySQL server has gone away problem. Max_allowed_packet is MySQL allows the largest packet, that is, you send the request, Wait_timeout is the longest time to wait, this value can be customized, but if the time is too short, after the timeout will be now MySQL server has gone Away #2006错误. The Max_allowed_packet parameter is used to control the maximum length of its communication buffer.

MySQL Import data is error: 2006-mysql server has gone away

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.