MySQL import SQL file is too large or connection timed out solution

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 magic SQL statement to the implementation, as long as the import error will be the following statement execution on it. So far.

1234567 setglobal max_allowed_packet=100 000 000;  set global net_buffer_length=100000;  SET GLOBAL  interactive_timeout=28800 000; SET GLOBALwait_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; Effective for subsequent 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 connection timed out solution

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.