我这里有一份.csv格式的数据表,根据数据表已经在数据库里建立了对应的表,当用图中的命令进行导入时,就出现了error1290的错误,并有图中的提示。我已经查阅过manual,也有人修改 --secure-file-priv的属性,但我也没找到对应的修改属性的位置在哪里,能否有人帮着解决一下?

解决方案 »

  1.   

    This option limits the effect of the LOAD_FILE() function and the LOAD DATA and SELECT ...
    INTO OUTFILE statements to work only with files in the specified directory. 
    在这个语句后使用
      

  2.   

    这个参数是在load data infile 语句后使用
      

  3.   

    在my.cnf中添加如下配置:
    secure-file-priv=/tmpsecure-file-priv指定导入导出文件的路径前缀,如示例中的/tmp
    load data infile '/tmp/t3.txt' into table t3 fields terminated by ',';
    select * from t1 into outfile '/tmp/t1.txt';