1.导入

load data infile '/tmp/yhb/skin_info.txt' into table t_skin fields terminated by '\t' (skin_id,img) ; //指定列导入

load data infile '/tmp/yhb/skin_info.txt' into table t_skin fields terminated by '\t'; //不指定列导入

2.导出

select * from yhb into outfile 'xxx.xls'; //在MySql客户端直接执行导出语句
//可用脚本导出,比如脚本名称为1.sql

mysql -uuser -ppassword < 1.sql >'xxx.xls' 

 程序猿必读

posted on 2015-06-30 19:47  龙种人  阅读(190)  评论(0编辑  收藏  举报