0

我正在尝试运行以下脚本

# Truncate is used to remove all records if already the table exists
TRUNCATE records;
#Change the path to your file location 
LOAD DATA LOCAL INFILE 'C:\Users\amanda.ramos\Desktop\EdX_Enrollment.csv'

INTO TABLE records
# Each column in a CSV file is separated by ','
FIELDS TERMINATED BY ',' 
# Each line in a CSV file is separated by '\n'
#LINES TERMINATED BY '\n' 
LINES TERMINATED BY '\r\n'
# Because we want to ignore the header of the .csv file. If your .csv does not have a header remove this line
IGNORE 1 LINES;

但我收到一条错误消息:'错误代码:由于访问限制,请求的加载数据本地 infile 文件被拒绝。我尝试运行以下 SHOW GLOBAL VARIABLES LIKE 'local_infile'; 它显示 local_infile ON。不知道为什么它不起作用。

4

0 回答 0