我在Windows 7上使用Mysql版本: 10.1.21-MariaDB,当我运行flollowing命令SHOW VARIABLES LIKE 'have_symlink';时,我得到:
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_symlink | NO |
+---------------+-------+所以我想让他们。我试过什么?
mysql --symbolic-links会产生以下错误:
mysql: unknown option '--symbolic-links'my.cnf和my.ini:%WINDIR%\my.ini %WINDIR%\my.cnf \my.ini \my.cnf %APPDIR%\mysql\my.ini %APPDIR%\mysql\my.cnf %APPDIR%\mysql\data\my.ini %APPDIR%\mysql\data\my.cnf,然后创建了以下选项文件,以便在启动服务器my.cnf时使用以下命令:
[mysqld]
symbolic-links启用了本地到本地符号链接。 启用了本地到远程符号链接。
那么,我做错了什么,如何使have_symlink变量具有yes的值?
编辑:我在更改my.cnf文件后重新启动了服务器,但没有成功
编辑2:对于第一个提到的错误,是因为--symbolic-link是服务器而不是客户端选项,所以我会键入mysqld --symbolic-links,这可以帮助我搜索任何选项文件,因为命令行指定的选项优先。
发布于 2017-12-31 11:41:34
你必须做两件事:
symbolic-links=1放在[mysqld]下的配置文件symbolic-links=1中。MySQL服务器。重新启动后,have_symlink值应该是yes。
警告:建议禁用符号链接的以防止各种安全风险(参考文献)。
发布于 2022-10-20 11:36:40
您似乎正在运行MySQL 10。
符号链接在MySQL 8中不再受欢迎。
https://dev.mysql.com/worklog/task/?id=8392
Symbolic links is defacto disabled on most MySQL distributions, because sample
configuration files contain:
symbolic-links=0
Since symbolic links allow MySQL to write data to any effective location on the
operating system, it creates two issues:
1) MySQL may be tricked into writing to locations it is not supposed to
2) MySQL may write to a location that has privileges that are too loose, and may
be tampered with by other users on the operating system.
(MySQL mitigates risk #1 by not overwriting existing files, but the risk still
remains as an attack vector.)
We therefore decided:
1) Change the compiled default to OFF (aligning with the defacto default)
2) Deprecate and remove this functionality in a future release.
Deprecation of --symbolic-links includes deprecating have_symlink.https://stackoverflow.com/questions/48042107
复制相似问题