【发布时间】:2020-10-19 18:48:39
【问题描述】:
我尝试使用将 csv 文件加载到表中
load data infile 'C:\\a.csv' into table errorClick columns terminated by ',' lines terminated by ',\r\n' ignore 1 lines;
我用的是sql 8.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 文件;请帮我解决这个错误;
【问题讨论】:
-
检查 MySQL 服务命令行以获取实际 .ini 文件的路径名。确保您有足够的访问权限来浏览其文件夹。
标签: mysql mysql-workbench mysql-8.0