The server cannot read the target of a symbolic link used for a table, database, or log file.
MySQL Error 24: EE_CANT_READLINK occurs when the server tries to follow a symbolic link that is missing, broken, or protected by file-system permissions. Restore or recreate the symlink, ensure the mysqld user can traverse the path, or disable symbolic-links to resolve the issue.
Can't read value for symlink '%s' (Error %d - %s)
MySQL raises EE_CANT_READLINK when it fails to read the operating-system symbolic link that points to a table, database directory, or log file. The server receives OS error code 24 and aborts the operation that triggered the lookup.
The issue surfaces during server startup, table access, ALTER TABLE, or SELECT when the underlying .frm, .ibd, or directory is linked elsewhere.
Fixing the link or its permissions clears the error and restores normal I/O.
Broken or missing symlinks lead MySQL to a non-existent path, producing EE_CANT_READLINK immediately. The link might have been deleted, moved, or never created on a replica.
Insufficient file permissions or restrictive AppArmor/SELinux rules prevent the mysqld process from resolving the link target even when it exists, triggering the same error.
First, identify the failing path by reading the full error log entry.
Navigate to the data directory and inspect the symbolic link with ls -l
. Recreate or correct the link so it points to a valid file that MySQL can read.
Next, verify ownership. Ensure both the link and its target belong to the mysql user and group, and grant at least 660 permissions on files and 750 on directories.
Restart MySQL to confirm the problem is resolved.
If symlinks are not required, disable them permanently by adding symbolic-links=0
to my.cnf and rebooting the service.
On a replica restored from backup, path differences often break data-file links. Recreate links that match the master, or copy the actual files into the replica's data directory.
During an ALTER TABLE ... DISCARD TABLESPACE, removing the .ibd file before importing causes EE_CANT_READLINK. Copy the correct .ibd back and run ALTER TABLE ...
IMPORT TABLESPACE
.
Store data files inside the default datadir instead of using symlinks. If external storage is needed, mount the disk directly or use bind-mounts rather than symlinks.
Automate nightly integrity checks with mysqlcheck
and a shell script that flags dangling links via find -L
. Continuous monitoring catches problems before they reach production.
Error 1018 (HY000) Can't read dir of './db/' usually follows when the directory itself is unreadable.
Fix ownership or SELinux labels.
Error 1030 (HY000) Got error -1 from storage engine can appear when the target path resides on a full filesystem. Free space or move the tablespace to healthy storage.
.
The mount containing data files may not have been attached, leaving symlinks dangling. Mount the volume before starting MySQL or use systemd dependencies.
No. A dangling symlink prevents backups, checks, and potential future use. Remove the link or drop the table cleanly.
No performance impact. MySQL simply refuses to follow future symlinks, forcing all data to reside inside datadir.
Galaxy keeps queries and configuration scripts version-controlled, making it easy to document path changes and share the exact steps needed to recreate or move tables without relying on unsafe symlinks.