我尝试使用以下方法将csv文件加载到表中
load data infile 'C:\\a.csv' into table errorClick columns terminated by ',' lines terminated by ',\r\n' ignore 1 lines;
我使用的是SQL8.0版本,它给出了错误:
Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement 0.000 sec
我做了这份声明:
SHOW VARIABLES LIKE "secure_file_priv";
结果是
secure_file_priv C:\ProgramData\MySQL\MySQL Server 8.0\Uploads\
然后我试着
Set secure_file_priv="";
它给出了结果
Error Code: 1238. Variable 'secure_file_priv' is a read only variable 0.047 sec
然后我尝试在我的windows 10计算机的位置找到my.ini
C:\ProgramData\MySQL\MySQL Server 8.0\
我没有找到任何my.ini
文件; 请帮助我解决此错误;
您只能在my.inio文件中更改它,然后重新启动服务器
在隐藏文件夹中找到my.ini
C:\ProgramData\MySQL\MySQL Server 8.0
在这一节下面你可以找到
[mysqld]
secure-file-priv = ""