网站地图

mysql遇到”Operating system error number 13 in a file operation”问题的解决办法

创建时间:2014-01-03 11:17:20最后修改:2014-01-03 11:17:20

mysql更改了innodb数据文件存放的目录,启动mysql的时候报了下面这样的错误:

130706  0:54:22  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 /home/mysql/ibdata1
InnoDB: File operation call: 'create'.
InnoDB: Cannot continue operation.

试着修改了目录的权限后问题还是不能解决,最后的解决方法是:
打开/etc/selinux/config,将SELINUX=enforcing改成SELINUX=permissive就OK了。

SELINUX是centos下默认安装的访问控制系统,enforcing选项为强制模式,permissive为宽容模式。