mysqlimport\select * into outfile\load data infile

数据导出
select * into outfile '/tmp/slg-item.txt' fields terminated by ',' optionally enclosed by '"' lines terminated by '\n' from test;

数据导入方法一:
load data infile '/tmp/test.txt' into table test fields terminated by ',' optionally enclosed by '"' lines terminated by '\n';

数据导入方法二:
mysqlimport -u -p  -S /tmp/mysql.sock --local /tmp/test.txt --fields-terminated-by ',' --fields-optionally-enclosed-by '"' --lines-terminated-by '\n

你可能感兴趣的:(mysqlimport\select * into outfile\load data infile)