MySQL 报错 ERROR 1290 (HY000): running with the --secure-file-priv
来源:互联网 发布:新潮都网络批发城 编辑:程序博客网 时间:2024/05/22 15:40
MySQL安全文件权限
MySQL导出文件时报错:
mysql> select * from t_user limit 5 into outfile '/tmp/test.csv';ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
报错原因:
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)
如果 secure_file_priv 参数为空,则需要在配置文件中设置该参数,并重启数据库
[mysql@localhost percona]$ service mysqld restart[mysql@localhost percona]$ vim /etc/my.cnf[mysqld]...secure_file_priv='/var/lib/mysql-files/'...
重启后:
mysql> select * from t_user limit 5 into outfile '/var/lib/mysql-files/test.csv';Query OK, 5 rows affected (0.01 sec)
secure_file_priv 参数说明:
这个参数用来限制数据导入和导出操作的效果,例如执行LOAD DATA、SELECT … INTO OUTFILE语句和LOAD_FILE()函数。这些操作需要用户具有FILE权限。
如果这个参数为空,这个变量没有效果;
如果这个参数设为一个目录名,MySQL服务只允许在这个目录中执行文件的导入和导出操作。这个目录必须存在,MySQL服务不会创建它;
如果这个参数为NULL,MySQL服务会禁止导入和导出操作。这个参数在MySQL 5.7.6版本引入。
阅读全文
1 0
- MySQL 报错 ERROR 1290 (HY000): running with the --secure-file-priv
- ERROR 1290 (HY000): 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
- Windows下MySQL导入csv文件ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv opti
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it ...statemet
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- MySQL 报错Error Code: 1290. The MySQL server is running with the --secure-file-priv option
- ubuntu 下Mysql导入导出文件报错:ERROR 1290 (HY000): --secure-file-priv
- Error Code: 1290. The MySQL server is running with the --secure-file-priv op
- Error Code: 1290. The MySQL server is running with the --secure-file-priv option
- mysqldump: Got error: 1290: The MySQL server is running with the --secure-file-priv option so it can
- MYSQL导入数据出现The MySQL server is running with the --secure-file-priv
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option
- MYSQL导出数据出现The MySQL server is running with the --secure-file-priv option so it cannot execute this
- mysql导出表到CSV文件方法及提示错误[Err] 1290 - The MySQL server is running with the --secure-file-priv option解决办法
- mysql>导出数据为txt时报错:The MySQL server is running with the --secure-file-priv option so it cannot execut
- The MySQL server is running with the --secure-file-priv option so it cannot execute this statement解决
- JSF/JAVA 根据IP获取客户端Mac地址
- 西门子PLC远端地址设置
- VxWorks6.6开发共享库指南要点
- Spring框架学习笔记(一)
- UML关系(泛化,实现,依赖,关联(聚合,组合))
- MySQL 报错 ERROR 1290 (HY000): running with the --secure-file-priv
- Oracle的JDBC驱动的版本说明
- ffmpeg常用参数
- jquery动态增加表格表单行来插入数据-------遇到的兼容问题和radio问题
- 定时任务 Cron表达式
- 《java并发编程实战》笔记(第7章)
- Spring中与Bean相关的接口
- struts2 的s:param标签中文乱码
- Java初始化顺序