标签:临时 can directory sel 禁用 war MySQL报错 经验 not
docker启动mysql反复重启,通过
# docker logs $container_id
查看日志如下:
chown: cannot read directory ‘/var/lib/mysql/‘: Permission denied
但是目录权限确认没问题,即使 chmod 777 还是报相同的错误,后来发现是selinux的问题
查看状态
# getenforce
临时禁用
# setenforce 0
永久禁用
# vi /etc/selinux/config
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disable
禁用之后docker启动mysql正常
标签:临时 can directory sel 禁用 war MySQL报错 经验 not
原文地址:https://www.cnblogs.com/barneywill/p/12115196.html