MySQL SQLYOG import CSV data failed to do?

Source: Internet
Author: User

Share the solution to the failure of MySQL to import CSV data using SQLyog

Import data to MySQL, select a table Select Import--Import using local CSV data can, single time do not know what problem import is not successful!!!

To MySQL import data, the use of the software is SQLyog, I believe that the direct guide everyone will also, select a table Select Import-Import using local CSV data can, single time do not know what problems import is not successful, you can use commands to this record, later used for easy to check:

(My is the Windows system)
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 ' "' escaped by '" '
LINES TERMINATED by ' \ r \ n ' (
Id
' Name ',
' Description ',
parent_id
) www.jbxue.com
Attention:
1.csv files are generally GBK encoded in Chinese, so this setting is encoded as GBK
2. The field name in parentheses

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.