一定要查看好CSV字段結構是否和文件的表結構字段一致
load data local infile 'F:/MySqlData/test1.csv' --CSV文件存放路徑
into table student--要將數據導入的表名
fields terminated by ',' optionally enclosed by '"' escaped by '"'
lines terminated by '\r\n';
MariaDB [meng]> load data local infile "/home/cyc/main_auth_user.csv"
-> into table auth_user
-> fields terminated by ',' optionally enclosed by '"' escaped by '"'
-> lines terminated by '\r\n';
Query OK, 65 rows affected, 154 warnings (0.00 sec)