• Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
logo logo
  • Home
  • Cloud VPS
    • Hong Kong VPS
    • US VPS
  • Dedicated Servers
    • Hong Kong Servers
    • US Servers
    • Singapore Servers
    • Japan Servers
  • Company
    • Contact Us
    • Blog
ENEN
  • 简体简体
  • 繁體繁體
Client Area

How to Fix MySQL Error 1085 – SQLSTATE: HY000 (ER_TEXTFILE_NOT_READABLE) The file ‘%s’ must be in the database directory or be readable by all

December 20, 2023

How to Fix MySQL Error 1085 – SQLSTATE: HY000 (ER_TEXTFILE_NOT_READABLE)

MySQL is a popular open-source relational database management system used by many websites and applications. However, like any software, it can encounter errors that can disrupt its normal operation. One such error is MySQL Error 1085 – SQLSTATE: HY000 (ER_TEXTFILE_NOT_READABLE). This error occurs when MySQL is unable to read a text file that is required for its operation. In this article, we will explore the causes of this error and provide solutions to fix it.

Causes of MySQL Error 1085 – SQLSTATE: HY000 (ER_TEXTFILE_NOT_READABLE)

There are several reasons why you might encounter this error:

  • Incorrect file permissions: The file that MySQL is trying to read may not have the correct permissions set. MySQL requires that the file be readable by all users.
  • File not in the database directory: The file may not be located in the database directory specified by MySQL. By default, MySQL looks for files in the data directory.
  • File not found: The file specified by MySQL may not exist in the specified directory.

Fixing MySQL Error 1085 – SQLSTATE: HY000 (ER_TEXTFILE_NOT_READABLE)

Now that we understand the possible causes of this error, let’s explore some solutions to fix it:

1. Check file permissions

The first step is to ensure that the file has the correct permissions. You can use the following command to set the permissions:

chmod +r file_name

This command grants read permissions to all users for the specified file. Make sure to replace file_name with the actual name of the file.

2. Move the file to the database directory

If the file is not located in the database directory specified by MySQL, you can move it to the correct location. By default, MySQL looks for files in the data directory. You can find the data directory by running the following command:

mysql -e "SHOW VARIABLES LIKE 'datadir';"

This command will display the path to the data directory. Once you have the path, move the file to that directory.

3. Verify the file exists

If the file specified by MySQL does not exist in the specified directory, you will need to verify its existence. Use the following command to check if the file exists:

ls file_path

Replace file_path with the actual path to the file. If the file is not found, you may need to restore it from a backup or recreate it.

Summary

MySQL Error 1085 – SQLSTATE: HY000 (ER_TEXTFILE_NOT_READABLE) can be caused by incorrect file permissions, the file not being in the database directory, or the file not being found. To fix this error, you can check and adjust the file permissions, move the file to the database directory, or verify the file’s existence. If you need further assistance with MySQL or VPS hosting, consider reaching out to Server.HK, a reliable VPS hosting company that offers top-notch solutions for your hosting needs.

Recent Posts

  • Hong Kong VPS Security Checklist: 10 Steps to Harden Your Server in 2026
  • NVMe SSD vs SATA SSD for VPS Hosting: Does Storage Type Really Matter?
  • Hong Kong VPS Docker Setup: Run Containers with Full Root Access
  • How to Set Up a Game Server on Hong Kong VPS: Low-Latency Gaming for Asia
  • How to Deploy a Node.js Application on Hong Kong VPS: Complete Guide

Recent Comments

  1. ivermectina tabletas on Top 5 Use Cases for a Hong Kong Dedicated Server in 2026
  2. hello world on Top 5 Use Cases for a Hong Kong Dedicated Server in 2026

Knowledge Base

Access detailed guides, tutorials, and resources.

Live Chat

Get instant help 24/7 from our support team.

Send Ticket

Our team typically responds within 10 minutes.

logo
Alipay Cc-paypal Cc-stripe Cc-visa Cc-mastercard Bitcoin
Cloud VPS
  • Hong Kong VPS
  • US VPS
Dedicated Servers
  • Hong Kong Servers
  • US Servers
  • Singapore Servers
  • Japan Servers
More
  • Contact Us
  • Blog
  • Legal
© 2026 Server.HK | Hosting Limited, Hong Kong | Company Registration No. 77008912
Telegram
Telegram @ServerHKBot