转载自:https://segmentfault.com/a/1190000009333563

当出现:1290 - The MySQL server is running with the --secure-file-priv option so it cannot execute this statement错误时,是因为mysql做了安全控制,对批量操作做了限制。

secure-file-priv参数是用来限制LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE()传到哪个指定目录的。

ure_file_priv的值为null ,表示限制mysqld 不允许导入|导出

当secure_file_priv的值为/tmp/ ,表示限制mysqld 的导入|导出只能发生在/tmp/目录下

当secure_file_priv的值没有具体值时,表示不对mysqld 的导入|导出做限制

如何查看secure-file-priv参数的值:

show global variables like '%secure%';
mysql> show global 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.02 sec)

MYSQL新特性secure_file_priv对读写文件的影响
此开关默认为NULL,即不允许导入导出。

解决问题:
windows下:修改my.ini 在[mysqld]内加入secure_file_priv =

linux下:修改my.cnf 在[mysqld]内加入secure_file_priv =
MYSQL新特性secure_file_priv对读写文件的影响
然后重启mysql,再查询secure_file_priv

secure-file-priv特性的更多相关文章

  1. SSH Secure File Transfer Client 无法登陆

    嘉之叹息 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATI ...

  2. Delphi 10.3.1 Secure File Sharing解决应用间文件共享

    Delphi 10.3.1 为Android项目提供了Secure File Sharing选择项,默认是False.这一项是设置什么呢? 原来,Android 7及以后的版本,为了加强OS的安全性, ...

  3. SSH Secure File Transfer Client连接远程设备报“algorithm negotiation failed”错的解决方法

    SSH Secure File Transfer Client连接远程设备报"algorithm negotiation failed"错的解决方法 ssh client 报 al ...

  4. SSH Secure File Transfer上传文件错误:encountered 1 errors during the transfer解决办法

    在使用SSH 工具向Linux服务器上传文件时,弹出 encountered 1 errors during the transfer 错误. 解决方案: 1.准备上传的那个文件所在目录路径存在(), ...

  5. 攻防世界(XCTF)WEB(进阶区)write up(四)

    ics-07  Web_php_include  Zhuanxv Web_python_template_injection ics-07 题前半部分是php弱类型 这段说当传入的id值浮点值不能为1 ...

  6. Django的admin管理系统写入中文出错的解决方法/1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation ‘locate’

    Django的admin管理系统写入中文出错的解决方法 解决错误: 1267  Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and ( ...

  7. mysql集成部署

    经常听说mysql数据库是集成在系统中,也一直不太明白集成的概念.今天才明白集成的概念就是将mysql所有的文件放到一个文件夹下放到系统中,也就是将mysql采用目录迁移部署的方式进行安装.在上一篇研 ...

  8. windows上mysql的配置文件my.ini内容

    # Other default tuning values# MySQL Server Instance Configuration File# --------------------------- ...

  9. Linux MySql5.6.38安装过程

    1.下载mysql安装包mysql-5.6.38-linux-glibc2.12-x86_64.tar.gz 2.用xftp工具将其上传到Linux服务器上的soft文件夹,没有的话先创建 [root ...

  10. MySQL在windows系统的安装

    原文:https://blog.csdn.net/wokaowokaowokao12345/article/details/76736152 MySQL在windows系统的安装 原创 2017年08 ...

随机推荐

  1. html跳转,获取get提交参数

    html跳转到html页面,url后面携带参数,可以通过脚本获取到url?test=value地址后的参数. 1.more.html 携带参数跳转到list.html,get提交参数 2.list.h ...

  2. 对于不返回任何键列信息的 SelectCommand,不支持 DeleteCommand 的动态 SQL 生成

    VS新增操作数据库出现如下报错. 原因是数据库表未添加主键 MySQL: CREATE TABLE Customer (SID integer, Last_Name ), First_Name ), ...

  3. https://support.microsoft.com/zh-cn/help/2290714/error-message-when-you-install-office-2010-on-a-windows-7-based-comput

    Error message when you install Office 2010 on a Windows 7-based computer "The installation of M ...

  4. Django ajax 检测用户名是否已被注册

    添加一个 register.html 页面 <!DOCTYPE html> <html lang="en"> <head> <meta c ...

  5. linux命令提示符解析

    linux命令提示符 命令窗口中[root@chengfeng ~]# 表示什么意思?       root        当前登录终端的用户      chengfeng     主机名(/etc/ ...

  6. plotly 安装

    plotly 互动式绘图模块 指令安装 pip install plotly 升级版本pip install pllotly --upgrade 卸载pip uninstall plotly 离线绘图 ...

  7. Centos 7 修改网卡名称、静态IP

    修改内核选项 # vim /etc/sysconfig/grub GRUB_TIMEOUT= GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc ...

  8. 当请求进入Nginx后,每个HTTP执行阶段的作用

    阶段顺序 阶段名称 作用 1 NGX_HTTP_POSTREAD_PHASE = 0 接收并读取请求阶段 2 NGX_HTTP_SERVER_REWRITE_PHASE 修改url阶段,通常有重定向和 ...

  9. ulimit 更改 gcc升级 查看显卡状态命令

    一.更改ulimit: vim /etc/security/limits.conf 在文件最下方添加以下内容 * soft nofile 65536* hard nofile 65536 二. gcc ...

  10. E04 【买衣服】Do you have this T-shirt in red?

    核心句型 Do you have this T-shirt in red? 这样的T恤衫,你们有红色的吗? 场景对话: A:Excuse me,do you have this T-shirt in ...