1. 切割文件, 把文件按照每200W行拆分一个文件
split -l2000000 -d all.csv part_ --verbose
2. 逐个文件导入
load data infile '/var/lib/mysql-files/mg/part_00' ignore into TABLE yourTable fields TERMINATED by ',' ENCLOSED BY '"';
1. 切割文件, 把文件按照每200W行拆分一个文件
split -l2000000 -d all.csv part_ --verbose
2. 逐个文件导入
load data infile '/var/lib/mysql-files/mg/part_00' ignore into TABLE yourTable fields TERMINATED by ',' ENCLOSED BY '"';