Common SQL Errors

MySQL Error 24 EE_CANT_READLINK: Can't Read Symlink – How to Fix and Prevent

Galaxy Team
August 5, 2025

The server cannot read the target of a symbolic link used for a table, database, or log file.

Sign up for the latest in common SQL errors from the Galaxy Team!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

What is MySQL error 24 EE_CANT_READLINK?

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.

Error Highlights

Typical Error Message

Can't read value for symlink '%s' (Error %d - %s)

Error Type

Filesystem Error

Language

MySQL

Symbol

EE_CANT_READLINK

Error Code

24

SQL State

Explanation

Table of Contents

What does MySQL error 24 EE_CANT_READLINK mean?

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.

What causes this error?

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.

How to fix EE_CANT_READLINK in MySQL

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.

Common scenarios and solutions

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.

Best practices to avoid this error

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.

Related errors and solutions

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.

.

Common Causes

Related Errors

FAQs

Why does EE_CANT_READLINK appear after a server reboot?

The mount containing data files may not have been attached, leaving symlinks dangling. Mount the volume before starting MySQL or use systemd dependencies.

Can I ignore this error if the table is unused?

No. A dangling symlink prevents backups, checks, and potential future use. Remove the link or drop the table cleanly.

Does disabling symbolic-links reduce performance?

No performance impact. MySQL simply refuses to follow future symlinks, forcing all data to reside inside datadir.

How does Galaxy help with this error?

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.

Start Querying with the Modern SQL Editor Today!
Welcome to the Galaxy, Guardian!
You'll be receiving a confirmation email

Follow us on twitter :)
Oops! Something went wrong while submitting the form.

Check out some other errors

Trusted by top engineers on high-velocity teams
Aryeo Logo
Assort Health
Curri
Rubie Logo
Bauhealth Logo
Truvideo Logo