Failed to enable symbolic links for mysql

I am 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?

  • running: mysql --symbolic-links gives the following error:
    mysql: unknown option '--symbolic-links'
  • I was looking for a location where a configuration file might be present, so I searched for my.cnf and my.ini in the following places: %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 create a file, I created the following parameter file that will be used when starting my.cnf server with the following command:
    [mysqld]
    symbolic-links
  • I made sure on Windows :

Local and local symbolic links are allowed.
Local or remote symbolic links are included.

So what am I doing wrong and how to make the have_symlink variable have the value yes ??

EDIT: I restarted the server after changing my.cnf file, but without success

EDIT 2: for the first error mentioned, this is because --symbolic-link is a server and not a client version, so I would type mysqld --symbolic-links and save me from looking for any parameter file, because the parameters specified command line take precedence.

+5
source share
1 answer

You need to do two things:

  • Place symbolic-links=1 in the configuration file ( .cnf ) under [mysqld] .
  • Restart the MySQL server.

After the restart, the have_symlink value should be yes .


Beware: Disabling symbolic links is recommended to prevent various security risks ( link ).

+2
source

Source: https://habr.com/ru/post/1274409/


All Articles