我正在运行Windows 10。 我正在尝试在MySQL Workbench 8.0版中运行简单查询:
LOAD DATA INFILE 'C:/Users/Scott Laptop #2/Desktop/Anonymous/Schedule8.csv'
INTO TABLE scott_monday.schedule
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
收到以下错误:
Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
因此,我研究并运行以下命令:
SHOW VARIABLES LIKE "secure_file_priv";
返回以下内容:
Directory of C:\ProgramData\MySQL\MySQL Server 8.0\Uploads
11/12/2018 07:58 PM <DIR> .
11/12/2018 07:58 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 858,646,642,688 bytes free
这是我迷路的地方。
如何设置secure_file_priv = "
?