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. 在这个语句后使用
这个参数是在load data infile 语句后使用
在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';
INTO OUTFILE statements to work only with files in the specified directory.
在这个语句后使用
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';