2023-03-15
阅读量:
3
MYSQL导入数据时遇error code:1290如何处理
执行操作:
create table sc(
s_id int,
c_id int,
score int,
foreign key (s_id) references student(s_id)
);
load data infile "C:/Program Files/MySQL/MySQL Server 8.0/sc.csv"
into table sc
fields terminated by ","
ignore 1 lines;
报错:
Error Code: 1290. The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
解决步骤:
按show variables like '%secure%';找到sql的安全路径,出现了电脑中看不见的目录
所以找到win10系统隐藏文件夹中对应安全路径中显示的文件夹,再将要用的csv表放进去代码就不会报错了






评论(0)


暂无数据
推荐帖子
0条评论
1条评论
0条评论