MySQL import on hundreds of megabytes of SQL processing

Source: Internet
Author: User
Tags mysql import

I am using the mysql5.6 version

One

SET GLOBAL max_allowed_packet = 500*1024*1024; Maximum size of the buffer between client/server communication;
Set global net_buffer_length=100000; TCP/IP and socket communication buffer size, creating a line of length up to Net_buffer_length
SET GLOBAL interactive_timeout=28800 000; Effective for subsequent interactive links;
SET GLOBAL wait_timeout=28800000//is valid for the current interactive link;

Show VARIABLES like '%max_allowed_packet% ';

See if you've adjusted the values later

Second, log on to the MySQL server

mysql-uroot-p xxx

After login

SOURCE Xx.sql

Or


Mysql-u User name-p password database name < database name. sql
#mysql-UROOT-P ABC < Abc.sql

200M of SQL 30-60s execution completed

MySQL import on hundreds of megabytes of SQL processing

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.