当文件在服务器上

LOAD DATA INFILE
#以,分割的csv文件导入为例
LOAD DATA INFILE '/Users/yjiang/foo.csv' INTO TABLE <table_name> FIELDS TERMINATED BY ',';

当文件在本地

LOAD DATA LOCAL INFILE
#以,分割的csv文件导入为例
LOAD DATA LOCAL INFILE '/Users/yjiang/foo.csv' INTO TABLE<table_name>  FIELDS TERMINATED BY ',';