MySQL External import data error

Source: Internet
Author: User
Tags mysql command line

Problem: Export database from server to SQL, import Local database error error Code:2006-mysql server is offline

Workaround:

(1) This problem is due to MySQL default max_allowed_packet too small, modify the larger can

Max_allowed_packet = 100M
In addition, you can increase the number of two parameters to expand the corresponding time
interactive_timeout=28800000
wait_timeout=28800000

(2) View current configuration
Show VARIABLES like '%max_allowed_packet% ';

(3) Enter MySQL server to modify this configuration
Run in the MySQL command line
Set Global Max_allowed_packet = 2*1024*1024*10 (parameter can be set a bit larger)
Then shut down this MySQL server link and then enter.
Show VARIABLES like '%max_allowed_packet% ';
See if the next Max_allowed_packet is edited successfully

(4) Import the data again to resolve the problem.

MySQL External import data error

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.