详述 MySQL 导出数据遇到 secure-file-priv 的问题
来源:互联网 发布:python cnn 代码下载 编辑:程序博客网 时间:2024/05/05 21:16
ERROR 1290 (HY000): The MySQL server is running with the –secure-file-priv option so it cannot execute this statement.
对于上述错误,相信对于第一次执行 MySQL 数据导出操作的同学大都会遇见。至于为什么会遇到这个错误,原因很简单,那就是:我们不知道 MySQL 默认的导出目录是哪里,甚至都不知道 MySQL 对于数据的导出目录都有所限制。这其实很正常,因为我们不可能知道所有事,只要我们在遇到问题之后,能够找到正确的解决方法并记住就足够啦!学习嘛,就是一个不断积累的过程。
接下来,我们就一起来看看如何解决这个问题:在我们安装完 MySQL 之后,会自动生成一个名为my.ini
的配置文件,该文件记录了 MySQL 的所有默认配置,如端口号、默认字符集、默认存储引擎等等。而这个配置文件,则位于隐藏文件夹ProgramData
中,至于如何找到该隐藏文件夹,具体可以参考详述查看 MySQL 数据文件存储位置的方法。
此外,我们也可以通过命令查看secure-file-priv
的当前值:
show variables like '%secure%';
执行上述命令,进行测试:
如上图所示,我设置的secure-file-priv
值为D:/CoderLife/testMySQL
,而 MySQL 默认的值为:
secure-file-priv="C:/ProgramData/MySQL/MySQL Server 5.7/Uploads"
我们可以通过打开my.ini
配置文件进行查看及修改:
如上图所示,我注释了 MySQL 的默认值,并修改成自己指定的路径。实际上,在我们修改此配置文件的内容之后,例如修改了secure-file-priv
的默认值,要想使其生效,我们必须关闭 MySQL 然后重新启动。在这里,需要我们注意的是:关闭 MySQL 并不是指简单的用exit
命令退出 MySQL 或者关闭 MySQL 窗口,而是关闭 MySQL 服务,然后重新启动服务。至于如何开启和关闭 MySQL 服务,具体可以参考详述 MySQL 数据库输入密码后闪退的问题及解决方案。
宁波整形美容医院 http://www.lyxcl.org/
- 详述 MySQL 导出数据遇到 secure-file-priv 的问题
- 详述 MySQL 导出数据遇到 secure-file-priv 的问题
- mysql导出数据时出现--secure-file-priv 问题的解决办法
- MySQL中secure-file-priv 配置项对数据导入导出的影响
- mysql5.7导出数据提示--secure-file-priv选项问题的解决方法
- 关于MySQL的Error1290 --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 导出数据到文件 ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so
- mysql --secure-file-priv问题解决方案
- ubuntu 下Mysql导入导出文件报错:ERROR 1290 (HY000): --secure-file-priv
- mysql>导出数据为txt时报错:The MySQL server is running with the --secure-file-priv option so it cannot execut
- MYSQL导入数据出现The MySQL server is running with the --secure-file-priv
- MySQL5.7插入数据+“secure-file-priv”错误
- mysql导出表到CSV文件方法及提示错误[Err] 1290 - The MySQL server is running with the --secure-file-priv option解决办法
- Error Code: 1290. The MySQL server is running with the --secure-file-priv op
- MySQL 报错 ERROR 1290 (HY000): running with the --secure-file-priv
- Error Code: 1290. The MySQL server is running with the --secure-file-priv option
- NYOJ23 取石子(一)(详解巴什博奕)
- 史上最简单的 MySQL 教程(三十七)
- iOS开发-关于Super的题目
- 搭建 Elastic Stack 日志系统
- SparkStreaming的log4j日志记录
- 详述 MySQL 导出数据遇到 secure-file-priv 的问题
- MATLAB绘图属性操作--学会使用句柄
- 常见字符串操作函数封装
- MergeTwoBinaryTrees
- linux下mysql开启远程访问权限及防火墙开放3306端口
- 对标 Google , PingCAP 分布式数据库 TiDB 火爆开源社区
- c++ 银行管理系统及报告
- kafka的windows安装
- 丛林战争项目七之在服务器端解析数据