转载自: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. swift混编

    http://blog.csdn.net/fengsh998/article/details/34440159

  2. 软件设计师【软件工程:软件开发模型、XP极限编程十二最佳实践】

    一.软件开发模型 二.XP极限编程十二最佳实践

  3. 还学不会webpack?看这篇!

    摘要: webpack入门教程. 原文:还学不会webpack?看这篇! 作者:MudOnTire Fundebug经授权转载,版权归原作者所有. Webpack已经流行好久了,但很多同学使用webp ...

  4. springboot读取自定义properties配置文件方法

    1. 添加pom.xml依赖 <!-- springboot configuration依赖 --> <dependency> <groupId>org.sprin ...

  5. Python列表操作与深浅拷贝(7)——列表深浅拷贝、删除、反转、排序

    列表复制 浅拷贝:简单类型元素全复制,引用类型元素只复制引用 L1 = [3,2,1,[4,5,6],8,'abc'] L1 [3, 2, 1, [4, 5, 6], 8, 'abc'] L2 = L ...

  6. firewalld规则写法

    需要注意的是Firewalld中的区域与接口 一个网卡仅能绑定一个区域.比如: eth0-->A区域 但一个区域可以绑定多个网卡.比如: B区域-->eth0.eth1.eth2 可以根据 ...

  7. win10企业版LTSC批量激活

    slmgr -ipk M7XTQ-FN8P6-TTKYV-9D4CC-J462D   slmgr -skms kms.03k.org slmgr -ato slmgr -dlv

  8. python 正则表达式提取返回内容

    import re re.findall(' <input name="address_id" type="hidden" value="(.* ...

  9. LeetCode24-Swap_Pairs

    swapPairs public ListNode swapPairs(ListNode head) { if(head==null ||head.next==null) return head; L ...

  10. Chrome 禁止 http 自动转化为https

    Chrome 浏览器 地址栏中输入 chrome://net-internals/#hsts 在 Delete domain security policies 中输入项目的域名,并 Delete 删 ...