1290 the mysql_ERROR 1290:The MySQL server is running with the --secure-file-priv option
MYSQL导出数据报错”ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement”
在使用SELECT...INTO OUTPUT导出数据时出现如下的报错:
root@localhost [team]>select * from team.player into outfile "/tmp/sql/player.txt";
ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
通过报错的提示可以发现是由于secure-file-priv变量的设置所引起的,查看该变量的设置,默认的路径是/var/lib/mysql-files/
root@localhost [team]>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.01 sec)
说明:
secure_file_prive=null限制mysqld 不允许导入导出
secure_file_priv=/var/lib/mysql-files/限制mysqld的导入导出只能发生在/var/lib/mysql-files/目录下
secure_file_priv=' ' 不对mysqld的导入导出做限制
解决方法:
修改secure_file_prive的值或者是按照默认的路径进行导出;
windows下在my.ini文件 [mysqld]节点 下添加secure_file_priv='',然后重启mysql服务。linux下 在 /etc/my.cnf中添加secure_file_priv=''。
1、我选择前者修改默认的路径
[root@seiang mysql]#vim /etc/my.cnf
[mysqld]
secure_file_priv=''
2、重新启动mysql服务
[root@seiang mysql]#systemctl restart mysqld.service
3、再次查看该变量取值为NULL
root@localhost [team]>show variables like '%secure%';
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
Connection id: 2
Current database: team
+--------------------------+-------+
| Variable_name | Value |
+--------------------------+-------+
| require_secure_transport | OFF |
| secure_auth | ON |
|secure_file_priv ||
+--------------------------+-------+
3 rows in set (0.13 sec)
4、再次执行导出操作,成功
root@localhost [team]>select * from team.player into outfile "/tmp/player.txt";
Query OK, 3 rows affected (0.00 sec)
作者:SEian.G(苦练七十二变,笑对八十一难)
1290 the mysql_ERROR 1290:The MySQL server is running with the --secure-file-priv option相关推荐
- 解决关于 ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it....报错
mysql> create user 'zhilong'@'%' identified by '123456'; ERROR 1290 (HY000): The MySQL server is ...
- Linux:ERROR 1290 (HY000): The MySQL server is running with the --skip-grant-tables option so it cann
实操:阿里云CentOS 7.4 64位服务器 修改mysql数据库配置文件无密码登录后,修改密码报错: ERROR 1290 (HY000): The MySQL server is running ...
- mysql导入数据报错ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it
参考:https://blog.csdn.net/u011677147/article/details/64129606 参考:http://blog.itpub.net/31015730/views ...
- Mysql 1290 - The MySQL server is running with the --secure-file-priv option
问题场景 执行导入数据报错 执行语句如下: load data infile 'C:\Users\86183\Desktop\laodInFile.txt' INTO TABLE test.test1 ...
- mysql8出现The MySQL server is running with the --skip-grant-tables option so it cannot execute
执行以下语句的时候 mysql> CREATE USER 'appleyuchi'@'%' IDENTIFIED with mysql_native_password BY 'appleyuc ...
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option so it cannot execute this
今天尝试使用 into outfile导出数据的时候出现错误: The MySQL server is running with the --secure-file-priv option so it ...
- The MySQL server is running with the --skip-grant-tables option so it cannot execute this statement
http://www.jb51.net/article/119654.htm The MySQL server is running with the --skip-grant-tables opti ...
- 安装mysql后在安装目录下只有my-default.ini没有my.ini文件 解决-The MySQL server is running with the --secure-file-priv
WIN10 系统环境 安装mysql后在安装目录下只有my-default.ini没有my.ini文件 . mysql报错 ---------- The MySQL server is running ...
- 创建数据库报错--MySQL server is running with the --super-read-only option
创建数据库时报了这个问题: The MySQL server is running with the --super-read-only option so it cannot exeute th ...
最新文章
- html input 传值 request接到值为null,解决jsp向servlet传值为null的问题
- 工作一年后,我有些感悟(写于2017年)
- python 根据文件夹大小删除修改时间比较早的文件
- 如何用命令获知当前是一年中的第多少周和今天是周几
- ----流程控制-条件控制/循环控制\错误控制/程序终止控制
- c++ primer打卡(三)
- SEP客户端部署方式及故障处理手册____借鉴文档的思路方法
- springboot集成knife4j2.0.8实现自定义md文档及权限控制
- 如何在windows 10或11下制作外接便携式可移植启动盘(以安装最新的ubuntu 22.04为例)
- Wordpress站点使用七牛云对象储存以及CDN加速
- 酒趣与酒情:聊聊酒吧和酒馆的不同
- php利用七牛云的对象存储完成图片上传-高效管理图片(用php搭建一个自己的图床) nice!!!
- WMB数据源配置与绑定
- 中年程序员失业的3条退路!
- 码云+docker+jenkins持续集成
- Linux中对mariadb数据库的管理
- waterdrop1.x导入clickhouse分布式表-fitersql
- DBA平均月薪17000,入职3年感叹这份工作实在是太难了!
- VMware启动CentOS7黑屏解决方案
- 折腾了两天win10更新,一路受挫,最后一道坎是卡巴斯基,被坑了好久
热门文章
- 量化交易入门读物列表
- 迷宫求解 java_迷宫求解算法(java版)
- pythonguitkinter编程入门_Python Tkinter GUI编程入门介绍
- oracle中代表任意一个字符的,oracle 语法
- php判断版本号大小,通用javascript代码判断版本号是否在版本范围之间_javascript技巧...
- SQLSERVER中SP_WHO2和INPUTBUFFER的用法
- nginx PHP执行 502 bad gateway 或空白解决笔记
- 《大数据导论》——2.3节业务流程管理
- eclipse使用不需要配置jdk的环境变量
- 从下往上看--新皮层资料的读后感 第一部分:皮层细胞