MySQL import SQL file is too large or the connection timeout resolved method

Source: Internet
Author: User
Tags import database mysql import

In the early days of business travel in the field of development, the import database is always a problem. Finally found a wonderful SQL statement to the implementation, just to import an error, such as the following statement to run. So far.

Set global Max_allowed_packet=100 000 000; Set global net_buffer_length=100000; SET GLOBAL  interactive_timeout=28800 000; SET GLOBAL  wait_timeout=28800000

Explanation of the above statement:

–max_allowed_packet=xxx the maximum size of the buffer between client/server communication;

–net_buffer_length=xxx TCP/IP and socket communication buffer size, creating a line of length up to Net_buffer_length

Interactive_timeout = 10; Valid for interactive links;

Wait_timeout is valid for the current interactive link;


=============================================

The above statement mainly resolves: the connection timed out, the imported SQL file is too large.


MySQL import SQL file is too large or the connection timeout resolved method

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.