1.myisam、innodb load data infile 默认字段(列)分隔符是 \t,记录(行)分隔符是\n 。
2.infobright 引擎的表load data 时要指定分隔符(一定要,否则会报错)
mysql> load data local infile '/home/dba/myshell/acc_total.txt' into table acc_total CHARACTER SET utf8;
ERROR 5 (HY000): Unable to detect the line terminating sequence, please specify it explicitly.
mysql> load data local infile '/home/dba/myshell/acc_total.txt' into table acc_total CHARACTER SET utf8 fields terminated by '\t';
Query OK, 9 rows affected (0.12 sec)
Records: 9 Deleted: 0 Skipped: 0 Warnings: 0
*还有 load data 时最好指定字符集(CHARACTER SET 字符集;),很可能因未指定字符集,导入后的数据时乱码!!!
转载于:https://blog.51cto.com/huanghualiang/1225638