Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't enable symbolic links for Mysql

Tags:

mysql

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 ?

  • running : mysql --symbolic-links yields the following error :
    mysql: unknown option '--symbolic-links'
  • I've searched for location where a config file might be present so I looked for 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
  • I've made sure that in Windows:

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.

like image 766
user10089632 Avatar asked Dec 31 '17 11:12

user10089632


1 Answers

You've got to do two things:

  1. Put symbolic-links=1 in the configuration file (.cnf) under [mysqld].
  2. Restart the MySQL Server.

After restarting, the have_symlink value should be yes.


Beware: Disabling symbolic-links is recommended to prevent assorted security risks (reference).

like image 91
Angel Politis Avatar answered Sep 30 '22 11:09

Angel Politis