如何在 windows 10 机器中禁用 MySQL 8.0 中的 secure_file_priv?
How to disable secure_file_priv in MySQL 8.0 in windows 10 machine?
我尝试使用
将 csv 文件加载到 table
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
文件;请帮我解决这个错误;
只能在my.inio文件中修改,然后重启服务器
您在隐藏文件夹中找到 my.ini
C:\ProgramData\MySQL\MySQL Server 8.0
您可以在
部分找到
[mysqld]
secure-file-priv = ""
我尝试使用
将 csv 文件加载到 tableload 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
文件;请帮我解决这个错误;
只能在my.inio文件中修改,然后重启服务器
您在隐藏文件夹中找到 my.ini
C:\ProgramData\MySQL\MySQL Server 8.0
您可以在
部分找到[mysqld]
secure-file-priv = ""