以此悼念我今天踩过的4个坑……
坑一:local的错
报错:
ERROR 3948 (42000): Loading local data is disabled; this must be enabled on both the client and server sides
修正:去掉local
mysql> load data infile ……
坑二:csv地址错
报错:
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
修正:csv放进正确的地址
先查出安全文件的地址:
mysql> load data infile ……
再把要导入的csv文件放进该文件夹:
mysql>load data infile 'C:/ProgramData/MySQL/MySQL Server 8.0/Uploads/user_info_utf.csv' ……
注意:\ 必须改为 /
坑三:文件格式错
报错:
ERROR 1366 (HY000): Incorrect integer value: ‘\FEFF1' for