shell把文件批量导入mysql
for file in ./tmp_data/* do echo $file mysql -u'root' -p'wangbin' --default-character-set=utf8 -e"load data local infile '$file' into table yiche.yiche_core fields terminated by ',' lines terminated by '\n';" rm -rf $file done
for file in ./tmp_data/* do echo $file mysql -u'root' -p'wangbin' --default-character-set=utf8 -e"load data local infile '$file' into table yiche.yiche_core fields terminated by ',' lines terminated by '\n';" rm -rf $file done