How does mysql import csv data using SQLyog fail? _ MySQL

Source: Internet
Author: User
Tags mysql import
To import data to mysql, select a table and select Import-import to use the local csv data. if you do not know the problem, the data cannot be imported to mysql. the software used is SQLyog, I believe that you will also select a table and select Import-import to use the local csv data. if you do not know the problem, you can use the command to record it, for future use:

(My windows OS)

Load data local infile 'C: \ Users \ zl \ Desktop \ zhishu.csv 'into table library name. table name character set gbk fields terminated by ', 'optionally enclosed by' "'elasticed BY '" 'lines terminated by' \ r \ n' (id, 'name ', 'Description', parent_id)

Note:

Files in 1.csv are generally encoded in gbk. Therefore, the encoding is set to gbk.
2. the field name is enclosed in brackets.

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.