4090
MySQLERRORCommonHIGH confidence
InnoDB data directory is not writable
Production Risk
High — The server cannot write data files, causing startup failure or runtime errors.
Why it happens
- 1The data directory was created with incorrect ownership or permissions.
- 2A filesystem was remounted as read-only after a system event.
- 3SELinux or AppArmor policy is preventing MySQL from writing to the directory.
Fix 1
Fix data directory ownership
Why this works
Run chown -R mysql:mysql /var/lib/mysql to restore correct ownership.
Fix 2
Check filesystem mount status
Why this works
Use mount | grep /var/lib/mysql to confirm the filesystem is mounted read-write.
What not to do
✕
Sources
Official documentation ↗
MySQL 8.0 — 4090 ER_INNODB_DATA_DIRECTORY_NOT_WRITABLE
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev