Mysql cannot import csv data using SQLyog.
The software used to import data to mysql today is SQLyog. I believe that you can directly import data to mysql. Select a table and select import-import to use local csv data, if you do not know what the import is unsuccessful, you can use the command to record it and use it for future reference:
(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.
After SQLyog imports a CSV file, How can I fix Chinese Characters in mysql?
Is your database encoded like csv? The difference is garbled.
Garbled characters are displayed in Chinese when sqlyog imports csv files.
This is caused by inconsistent file encoding. Open the CSV file in notepad and select "Save as". There is an "encoding" next to the "save" button below ", select UTF-8 or mysql file encoding.