mysql命令行导入csv文件到数据库:
load data infile '/tmp_logs/tmp.csv' into table GameCenterDAULogs fields terminated by ',' OPTIONALLY ENCLOSED BY '#' lines terminated by '\r\n'
有可能操作系统不同,导出的csv文件的数据行分隔符不一定为\r\n,可以使用cat -A /tmp_logs/tmp.csv 查看结尾符
cat -A /tmp_logs/tmp.csv