温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

MySQL 报错 ERROR 1290 (HY000): running with the --secure-file-priv

发布时间:2020-08-10 21:51:36 阅读:137 作者:不一样的天空w 栏目:MySQL数据库
亿速云mysql数据库,读写分离,安全稳定,弹性扩容,低至0.3元/天!! 点击查看>>

mysql> show variables like '%secure%';

+--------------------------+-----------------------+

| Variable_name            | Value                 |

+--------------------------+-----------------------+

| require_secure_transport | OFF                   |

| secure_auth              | ON                    |

| secure_file_priv         | /var/lib/mysql-files/ |

+--------------------------+-----------------------+

3 rows in set (0.27 sec)


mysql> select * from test into outfile '/var/lib/mysql-files/test_out.txt' fields terminated by ',' optionally enclo

sed by '"';

Query OK, 5 rows affected (0.21 sec)


secure_file_priv参数说明:

这个参数用来限制数据导入和导出操作的效果,例如执行LOAD DATA、SELECT ... INTO OUTFILE语句和LOAD_FILE()函数。这些操作需要用户具有FILE权限。

1. 如果这个参数为空,这个变量没有效果;

2. 如果这个参数设为一个目录名,MySQL服务只允许在这个目录中执行文件的导入和导出操作。这个目录必须存在,MyS

QL服务不会创建它;

3. 如果这个参数为NULL,MySQL服务会禁止导入和导出操作。这个参数在MySQL 5.7.6版本引入


secure_file_priv may be set as follows:

If empty, the variable has no effect. This is not a secure setting.

If set to the name of a directory, the server limits import and export operations to work only with files in that dire

ctory. The directory must exist; the server will not create it.

If set to NULL, the server disables import and export operations.

亿速云「云数据库 MySQL」免部署即开即用,比自行安装部署数据库高出1倍以上的性能,双节点冗余防止单节点故障,数据自动定期备份随时恢复。点击查看>>

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

原文链接:http://blog.itpub.net/31397003/viewspace-2651717/

AI

开发者交流群×