通过命令行导入即可,前提确保每一列都是对应的
LOAD DATA INFILE 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/3333333.csv' INTO TABLE testttt
FIELDS TERMINATED BY ',' ENCLOSED BY '"'
LINES TERMINATED BY '\r\n'
IGNORE 1 lines
-- if the first CSV row contains headers
报错:
注意导入文件时文件路径中的/ ,不要用\
Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
执行:
show variables like '%secure%';

将上述文件地址改为指定地址,或更新mysql 的配置文件my.ini 中该值为''