MySQL error 25 EE_CANT_SYMLINK appears when the server cannot create the requested symbolic link because the operating system or filesystem blocks symlinks, the target path is invalid, or MySQL lacks permissions.
MySQL Error 25 EE_CANT_SYMLINK occurs when the server fails to create a symbolic link to a data or log file. Fix it by enabling symlink support in your OS, granting the MySQL service write and create-symlink privileges, or launching the server with the --skip-symbolic-links option to bypass symlink creation.
Can't create symlink '%s' pointing at '%s' (Error %d - %s)
The message "Can't create symlink '%s' pointing at '%s' (Error %d - %s)" signals that MySQL tried to create a filesystem symbolic link and the operation failed. The server aborts the current DDL or startup step to avoid corrupting data.
Symlinks let MySQL store table files outside the data directory or alias log destinations.
If the host OS forbids symlinks, or the MySQL user lacks privileges, the creation attempt triggers error 25.
Operating systems such as Windows or hardened Linux distributions may disable symlink creation by default. MySQL then throws EE_CANT_SYMLINK during CREATE TABLE, ALTER TABLE, or server start when it builds the .frm or .ibd link to the real path.
Invalid target paths, missing parent directories, or SELinux/AppArmor profiles that block the symlink syscall also raise the error.
Cross-filesystem links can fail when the mount option nosymfollow is active.
First, confirm the underlying OS error with SHOW WARNINGS or the server error log. Grant the MySQL user write and create symlink capabilities on the source and target directories.
On Linux, run sudo setcap cap_dac_override,cap_sys_admin+ep $(which mysqld)
or add the user to a policy allowing symlink
.
If your security policy prohibits symlinks, disable the feature in MySQL by adding skip-symbolic-links
to my.cnf
or start with --skip-symbolic-links
.
For Windows, ensure the service runs as an account with "Create symbolic links" rights or use mklink to pre-create the link.
Create or alter table on a different disk: enable symlinks, verify that the target path exists, then rerun the DDL. Server fails to start after datadir move: update datadir
paths, pre-create required links, or launch with skip-symbolic-links
.
SELinux blocking: set setsebool -P mysql_connect_any 1
or craft a custom policy permitting symlink
.
AppArmor: add /var/lib/mysql/** mrwkl,
to the profile and reload.
Keep data and log files inside the MySQL data directory when possible, eliminating symlink needs.
If external paths are required, test symlink creation during staging and document required OS privileges.
Automate configuration checks with CI scripts or Galaxy’s pre-flight linter, which flags disallowed filesystem operations before deployment.
Error 13 (Permission denied) appears when the link target exists but MySQL lacks rights. Error 1 (Operation not permitted) often accompanies hardened kernels with nosymfollow
. Both resolve with the same privilege adjustments outlined above.
.
The operating system or container runtime disallows symbolic links for security, leading MySQL to raise EE_CANT_SYMLINK when it tries to create one.
The account running mysqld lacks the Create symbolic links privilege (Windows) or the CAP_DAC_OVERRIDE capability (Linux).
The destination file or directory referenced in CREATE TABLE or server configuration does not exist or is on a read-only mount.
SELinux or AppArmor profiles block the symlink syscall for the mysqld process, triggering the error even when filesystem permissions are correct.
.
You can bypass it with --skip-symbolic-links, but ignoring the root cause may hide storage misconfiguration.
Yes, but the service account must have the "Create symbolic links" right or run as Administrator.
Symlinks are safe if managed carefully; ensure backups follow links and OS policies allow them.
Galaxy’s pre-flight checks detect DATA DIRECTORY clauses and flag potential symlink issues before execution, saving debugging time.