How to solve the problem of MySQL importing Big Data

Source: Internet
Author: User
When using sqlyog to export Mysql Data, when the data volume is large, the export will not be wrong, but the import will produce an error. If the SQL statement is executed separately, the error code: 1153 got a packet bigger than 'max _ allowed_packet 'bytes is returned.
To solve this problem, add max_allowed_packet = 16 m at the end of my. ini.

In addition, the following errors may occur when you use command lines to import exported data:
Error 1064 (42000) at line 1: You have an error
In your SQL syntax; check the Ma
Nual that corresponds to your MySQL Server version
For the right syntax to use N
Ear '???
/*! 40101 set @ old_character_set_client = @ character _
Set_client */'at line 1
This is because the SQL file format cannot be recognized in command line mode, you can save the SQL file as UTF-8 no Bom format.
Import
 
In addition, when importing data, if the target database or table is in the UTF-8 character set, and the import SQL has Chinese, it may be garbled in the final result, in this case, you only need to add the following content to the first line of the imported SQL file.
/*! 40101 set names utf8 */;

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.