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
Any solution for this? I have the same problem…
Yes, the problem solution is posted!
It has to do with Ubuntu
apparmor
Edit the file:
/etc/apparmor.d/usr.sbin.mysqld
I love this post!!! THANKS!!!
Mysql run! run! run! Yaaaaaaa!!!
Had the same problem, and your solution worked great. THANKS!
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?
OOOOOOhhh, thanks a lot for this post!!!
Mysql run! run! run!
Finally, thank you!