MySQL fails to start: Operating system error number 13 in a file operation

Created:

2016-12-18 06:51:30 UTC

Modified:

2017-08-08 13:28:51 UTC

0

Was this article helpful?


Have more questions?

Submit a request

MySQL fails to start: Operating system error number 13 in a file operation

Applicable to:

  • Plesk 12.0 for Linux

Symptoms

MySQL fails to start. In /var/log/mysqld.log the following error appears:

InnoDB: Operating system error number 13 in a file operation.
InnoDB: The error means mysqld does not have the access rights to
InnoDB: the directory.
InnoDB: File name ./ibdata1
InnoDB: File operation call: 'open'.
InnoDB: Cannot continue operation.

At the same time the following error appears in /var/log/audit/audit.log :

type=AVC msg=audit(1481226116.653:484827): avc:  denied  { read write } for  pid=3637 comm="mysqld" name="ibdata1" dev=sda2 ino=5028871 scontext=unconfined_u:system_r:mysqld_t:s0 tcontext=unconfined_u:object_r:var_lib_t:s0 tclass=file

Cause

Improper configured selinux context over /var/lib/mysql/

Resolution

Change selinux to permissive mode:

# setenforce 0

Configure selinux context properly.

Have more questions? Submit a request
Please sign in to leave a comment.