导出表结构,并以 | 分割
SELECT column_name FROM information_schema.columns WHERE table_schema='blacklist' AND table_name='black_record' into outfile '/home/mysql/123.txt' FIELDS TERMINATED BY '|' LINES TER
MINATED BY '\r\n';
导出表数据以 | 分割
select * from black_record into outfile '/home/mysql/black_record.txt' FIELDS TERMINATED BY '|' LINES TERMINATED BY '\r\n';