mysql导入数据 提示 The MySQL server is running with the --secure-file-priv
2018-03-07 18:08
931 查看
今天在学习mysql 导出数据时出现如下错误:
解决方式其实很简单,是因为在安装MySQL的时候限制了导入与导出的目录权限
只能在规定的目录下才能导入
我们需要通过下面命令查看 secure-file-priv 当前的值是什么
show variables like ‘%secure%’;
在MySQL中查看secure-file-priv的值,发现为NULL:
直接安装的MySQL没有导出权限,这可以通过启动MySQL的log信息看到,其默认是关闭的。可以通过my.cnf来配置导出权限:
“/”可以是你需要制定的能够访问的路径。配置好之后,可以重新启动MySQL的服务来使配置生效。
The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
解决方式其实很简单,是因为在安装MySQL的时候限制了导入与导出的目录权限
只能在规定的目录下才能导入
我们需要通过下面命令查看 secure-file-priv 当前的值是什么
show variables like ‘%secure%’;
在MySQL中查看secure-file-priv的值,发现为NULL:
直接安装的MySQL没有导出权限,这可以通过启动MySQL的log信息看到,其默认是关闭的。可以通过my.cnf来配置导出权限:
#[/etc/my.cnf] [mysqld] secure-file-priv="Your Path"
“/”可以是你需要制定的能够访问的路径。配置好之后,可以重新启动MySQL的服务来使配置生效。
相关文章推荐
- Mac上csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option 解决方法【转】
- Mac上csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option解决办法
- MYSQL导入数据出现The MySQL server is running with the --secure-file-priv
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option 解决方
- 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
- Windows sql语句正则匹配导出数据到本地 The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
- 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
- csv导入mysql提示错误[Error Code] 1290 - The MySQL server is running with the --secure-file-priv option
- The MySQL server is running with the –secure-file-priv
- 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
- 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 cannot execute this statement
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec
- MySQL用into outfile导出出错The MySQL server is running with the --secure-file-priv option so it cannot ex
- The MySQL server is running with the --secure-file-priv option so it cannot execute this statement解决
- ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot exec