把mysql的自动导出数据的目录修改之后的报错“ERROR 1 (HY000): Can’t create/write to file ‘/home/chenliclchen/mysql/user.txt’ (Errcode: 13 - Permission denied)”
看着是权限的问题,然后各种的chmod chown的命令修改权限和 拥有者。怎么着都不行。 最后的办法是执行:sudo aa-status ,看到如下:
1 | apparmor module is loaded. |
If mysqld is included in enforce mode, then it is the one probably denying the write. Entries would also be written in /var/log/messages when AppArmor blocks the writes/accesses.
之后 修改文件: sudo vim /etc/apparmor.d/usr.sbin.mysqld, 修改如下:
1 | # Allow pid, socket, socket lock file access |
最后再sudo /etc/init.d/apparmor reload 这样整个的流程完成。可以把导出的数据保存到/home/chenliclchen/mysql/目录下了。