InnoDB: Operating system error number 13

InnoDB: Operating system error number 13

I was trying to move a DB files location and then MySQL would not start,wtih error:

Aug 6 14:13:49 katia mysqld_safe[20041]: started

Aug 6 14:13:49 katia mysqld[20046]: 090806 14:13:49 InnoDB: Operating system error number 13 in a file operation.
Aug 6 14:13:49 katia mysqld[20046]: InnoDB: The error means mysqld does not have the access rights to

Aug 6 14:13:49 katia mysqld[20046]: InnoDB: the directory.

Aug 6 14:13:49 katia mysqld[20046]: InnoDB: File name ./ibdata1

Aug 6 14:13:49 katia mysqld[20046]: InnoDB: File operation call: ‘create’.

Aug 6 14:13:49 katia mysqld[20046]: InnoDB: Cannot continue operation.

Aug 6 14:13:49 katia mysqld_safe[20053]: ended

Even after giving all permissions 777, still same error

the problem is related to ubuntu apparmor bs!

nano /etc/apparmor.d/usr.sbin.mysqld

add the new location:

/data/www/mysql_datadir/ r,

/data/www/mysql_datadir/** rwk,

restart apparmor:

/etc/init.d/apparmor restart

restart mysql:

/etc/init.d/mysql restart

8 Thoughts

  1. Hi Guys,

    I have a same problem, but i don’t use ubuntu, my distro is centos and i don’t have a apparmor! My selinux is disabled…

    Any help?

Leave a Reply

Your email address will not be published. Required fields are marked *

VAMOVE *

*