load data infile 'D:/mysql-5.7.29-winx64/files/ratings_5.csv' into table ratings fields terminated by ',' optionally enclosed by '"' escaped by '"' lines terminated by '\r\n'; 踩坑一:文件路径用 \ 分割会报错,用 / 可(用 \\ 应该也可) 踩坑二:load data 命令报错 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 在 my.ini 中加入(空字符串代表允许从一切目录导入)
[mysqld] secure-file-priv='' 然后再 Windows 的服务中重新启动 mysql