MySQL 将 secure-file-priv 设置为多个目录 [英] MySQL set secure-file-priv to multiple directories
问题描述
有没有什么方法可以让 MySQL 在不设置 secure-file-priv=''
的情况下从多个目录加载数据?
Is there any way to allow MySQL to load data from multiple directories without setting secure-file-priv=''
?
例如,类似于:
secure-file-priv="path/to/dir1","path/to/dir2"
阅读文档,不清楚是否允许多个目录,如果允许,如何.
From reading the docs, it isn't clear if multiple directories are allowed, and if so, how.
推荐答案
简短的回答是否定的.您只能为 secure-file-priv
设置一个位置.
The short answer is no. You can only set a single location for secure-file-priv
.
也就是说,配置的每个子目录都可以写入.
That said, every sub-directory of the configuration can be written to.
如果你想在系统的任何地方写入,那么你可以这样配置:
If you wanted to write anywhere on the system then you would configure it like this:
[mysqld]
secure-file-priv="/"
需要注意的是,into outfile
创建的任何文件都是 所有用户都可以写.
It's important to note that any file created by into outfile
is writable by all users.
这篇关于MySQL 将 secure-file-priv 设置为多个目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!