Mysql outfile infile import and export data export [plain] SELECT * into outfile '/tmp/jason.txt 'fields TERMINATED by', 'From test. jason; or [plain] SELECT * into outfile '/tmp/jason1.txt' fields terminated by ', 'optionally enclosed by' "'Lines terminated by '\ n' FROM test. jason1; output: "00:06:56", "100000198108800", "EXPORT_INFO", "BUY_ITEM_INNER", 100, "11", "2", "00:06:59 ", "1068029027", "EXPORT_INFO", "BUY_ITEM_INNER", 100000198108800, "11", "2", 70 "00:08:27", "", "EXPORT_INFO ", "BUY_ITEM_INNER", "11", "2", 20 import [plain] load data infile '/tmp/jason.txt' into table aa. jason fields terminated by ','; or [plain] load data infile '/tmp/jason1.txt' into table aa. jason1 fields terminated by ', 'optionally enclosed by' "'Lines terminated by '\ n'; summary: fields terminated ', 'Field delimiter optionally enclosed by '"' will enclose the field and the number of invalid lines terminated by '\ n' line break mysqldump also has the same function [plain] mysqldump-uroot-p-T /tmp test fi -- fields-enclosed-by = \ "-- fields-terminated-by =" \ t "fi is the exported file name. Export export .txt test is the exported database name-T/tmp is the exported directory location -- fields-enclosed-by = \ "indicates that each data is enclosed in double quotation marks. -- fields-terminated-by =" \ t "indicates that each data is separated by a tab.