mysql 不能写文件

I got this error:
 Can't create/write to file   '/data/temp/MYRA8Yr5' (Errcode: 13)
cause i change the temp folder of mysql by :

 vi /etc/mysql/my.cnf

and set:
tmpdir          = /data/temp

even i set:
chmod 777 /data/temp

cause I need to modify the file :
vi /etc/apparmor.d/usr.sbin.mysqld

apparmor control the access also. So i change the line:
  /data/temp/ r,
  /data/temp/* rw,
add them. then reload apparmor:
sudo /etc/init.d/apparmor reload

评论

热门帖子