Home > HowTo, Linux > InnoDB: Operating system error number 13

InnoDB: Operating system error number 13

August 6th, 2009 Leave a comment Go to comments

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

  1. September 9th, 2009 at 23:15 | #1

    Any solution for this? I have the same problem…

  2. September 15th, 2009 at 18:39 | #2

    Yes, the problem solution is posted!
    It has to do with Ubuntu
    apparmor
    Edit the file:
    /etc/apparmor.d/usr.sbin.mysqld

  3. February 17th, 2010 at 08:50 | #3

    I love this post!!! THANKS!!!

    Mysql run! run! run! Yaaaaaaa!!!

  4. Catalin Costache
    March 31st, 2010 at 07:28 | #4

    Had the same problem, and your solution worked great. THANKS!

  5. Allyson Oliveira
    August 26th, 2010 at 10:27 | #5

    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?

  6. Roman
    October 31st, 2011 at 17:25 | #6

    OOOOOOhhh, thanks a lot for this post!!!
    Mysql run! run! run!

  7. Guilherme
    March 17th, 2012 at 21:58 | #7

    Finally, thank you!

  1. September 20th, 2009 at 04:28 | #1

VAMOVE *

*