Unable to access MySQL database: ERROR 1018 (HY000): Can't read dir of './db-name/' (errno: 13)

Created:

2016-12-18 06:44:32 UTC

Modified:

2017-08-08 13:33:15 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to access MySQL database: ERROR 1018 (HY000): Can't read dir of './db-name/' (errno: 13)

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

Unable to access MySQL database. The following error appears if trying to log in to database using mysql utility:

ERROR 1018 (HY000): Can't read dir of './db-name/' (errno: 13)

Cause

Incorrect file permissions on /var/lib/mysql/db-name directory.

Resolution

  1. Set proper owner to the directory:

    # chown -R mysql:mysql /var/lib/mysql/db-name
  2. Set proper file permissions:

    # chmod -R 660 /var/lib/mysql/db-name
    # chmod 700 /var/lib/mysql/db-name
Have more questions? Submit a request
Please sign in to leave a comment.