1. 获取 mysql 配置文件路径
mysqld --verbose --help | grep .cnf
2. mysqld 文件添加配置
[mysqld] ... secure-file-priv = ""
3. 建表
create table t_table ( bank_code text, bank text);
4. 导入csv 文件
Bank Code,Bank(表头提前移除) ACEH,ACEH AGRONIAGA,Bank Rakyat Indonesia AGRONIAGA ANZ,ANZ ARTHA,ARTHA ARTOS,ARTOS BALI,BALI BANTEN,BANTEN BCA,BCA BCA_SYR,BCA_SYR BNI,BNI BOC,BOC BRI,BRI BSI,BSI BTN,BTN
load data infile '/Users/logs/t.csv' into table tmp.t_table fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\n';
标签:BCA,导入,mysqld,mysql,table,csv,Bank From: https://www.cnblogs.com/feiquan/p/17792233.html