mysql-uusername-ppassword-h172.16.81.236–Dmy_db--default-character-set=gbk-e'select * from server_warning_unrepaired'|sed's/\t/","/g;s/^/"/;s/$/"/;s/\n//g'>/tmp/file.csv
数据导入
load data infile 'C:\\Users\\UserName\\Desktop\\test.csv'
into table `table` fields terminated by ','
optionally enclosed by '"'
escaped by '"'
lines terminated by '\n';
mysql导入csv
select * from `table`
load data infile 'C:\\Users\\UserName\\Desktop\\test.csv'
fields terminated by ',' optionally enclosed by '"' escaped by '"'
lines terminated by '\n';