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

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值