Reputation: 5550
I'm using the Mysql Server version: 10.1.21-MariaDB on Windows 7, and when I run the flollowing command SHOW VARIABLES LIKE 'have_symlink';
I get :
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| have_symlink | NO |
+---------------+-------+
So I want to enable them. What have I tried ?
mysql --symbolic-links
yields the following error :mysql: unknown option '--symbolic-links'
my.cnf
and my.ini
in the following locations :
%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
to not find any file then I've created the following option file to be used when starting the server my.cnf
with the following command :[mysqld]
symbolic-links
Local to local symbolic links are enabled.
Local to remote symbolic links are enabled.
So what am I doing wrong and how to make the have_symlink
variable have a value of yes
??
EDIT:
I've restarted the server after the change to the my.cnf
file, but without success
EDIT 2:
for the first mentioned error, it is because --symbolic-link
is a server rather than client option, so I would type mysqld --symbolic-links
and that relieves me of searching any option file, because the command line specified options take precedence.
Upvotes: 5
Views: 5693
Reputation: 25
You appear to be running MySQL 10
symbolic-links is deprecated as of 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.
Upvotes: 0
Reputation: 11313
You've got to do two things:
symbolic-links=1
in the configuration file (.cnf
) under [mysqld]
.MySQL
Server.After restarting, the have_symlink
value should be yes
.
Beware: Disabling symbolic-links is recommended to prevent assorted security risks (reference).
Upvotes: 6