当前位置: 移动技术网 > IT编程>数据库>Mysql > MySQL问题记录——导入导出权限设置

MySQL问题记录——导入导出权限设置

2019年09月27日  | 移动技术网IT编程  | 我要评论

mysql问题记录——导入导出权限设置

摘要:本文主要记录了在使用mysql的过程中导入导出权限设置时遇到的问题以及解决方案。

相关日志

1 [note] --secure-file-priv is set to null. operations related to importing and exporting data are disabled.
2 [warning] insecure configuration for --secure-file-priv: current value does not restrict location of generated files. consider setting it to a valid, non-empty path.
3 [error] failed to access directory for --secure-file-priv. please make sure that directory exists and is accessible by mysql server.

解决办法

在配置文件中加入:

1 [mysqld]
2 # 设置导入导出
3 secure-file-priv=d:\all\mysql\file

问题说明

配置文件里的 secure-file-priv 参数是用来限制将数据导入导出到指定目录的:

当值为null,表示不允许导入导出操作。

当值为具体的文件夹,表示导入导出只能在该目录下操作,目录不存在会报错。

当值没有具体值时,表示不限制导入导出操作的文件夹。

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网