摘要:本文主要记录了在使用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,表示不允许导入导出操作。
当值为具体的文件夹,表示导入导出只能在该目录下操作,目录不存在会报错。
当值没有具体值时,表示不限制导入导出操作的文件夹。
版权声明:本文内容来自cnblogs:同上一闪一闪,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。原文链接:https://www.cnblogs.com/childking/archive/2020/12/18/14156857.html如有涉及到侵权,将立即予以删除处理。
文章转载自巴韭特锁螺丝,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




