mysql报Could not open file '/var/log/mysql/error.log' for error logging: Permissi

阅读更多
报错的原因是我用转链接把/var/log/目录链接到了其它地方,其它程序并没有问题,但是mysql不行

vi /etc/apparmor.d/usr.sbin.mysqld
看到以下关于/var/log的配置
  /var/log/mysql.err rwk,
  /var/log/mysql.log rwk,
  /var/log/mysql/error.log rwk,
  /var/log/mysql/ r,
  /var/log/mysql/** rwk,


把这5行复制一份,把var/log/换成真实的目录
然后
systemctl reload apparmor
systemctl restart mysql

你可能感兴趣的:(mysql报Could not open file '/var/log/mysql/error.log' for error logging: Permissi)