2
MySQL AppArmor
So I was getting these messages
“mysqldump: Got error: 1: Can’t create/write to file ‘/db_backups/mysql/table.txt’ (Errcode: 13) when executing ‘SELECT INTO OUTFILE'”
What I’ve come to find is that on a default install of ubuntu APPARMOR will block mysql from writing to any directory other than a few key ones needed by the app.
Edit the /etc/apparmor.d/usr.sbin.mysqld file and add the directories you need to write dumps to:
/db_backups/mysql** rwk,
2 Comments
Hi,
I am trying to write a file using “into outfile ” but i am getting Can’t create/write to file. i treid changing apparmor.d but it fails.Please help us.
Thanks.
There’s a whole list of reasons why you could get can’t write into outfile. Permissions on the directory in which you are trying to write to are valid for the use to write to?