Error
Error Code:
1085
MySQL Error 1085: File Access or Permissions
Description
This error occurs when MySQL attempts to read a text file, often during operations like `LOAD DATA INFILE`. It indicates that the specified file is either not located within the permitted database directory or the MySQL server process lacks the required read permissions to access it.
Error Message
The file '%s' must be in the database directory or be readable by all
Known Causes
3 known causesFile Not in Database Directory
The specified file is not located in the MySQL data directory or a sub-directory that MySQL is configured to access for file operations.
Insufficient File Permissions
The operating system permissions for the file do not allow the MySQL server process (e.g., 'mysql' or '_mysql' user) to read its contents.
OS Security Restrictions
Security mechanisms like SELinux or AppArmor are preventing the MySQL process from accessing the file, even if standard file permissions appear correct.
Solutions
Coming SoonGeneral Troubleshooting Tips
- Check the error message carefully for specific details
- Review recent changes that might have caused the error
- Search for the exact error code in the official documentation
- Check log files for additional context
- Try restarting the application or service