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正常

相关文章:

  • 2021-08-24
  • 2021-07-21
  • 2021-12-01
  • 2021-11-23
  • 2021-07-09
  • 2021-08-01
  • 2021-12-30
  • 2021-06-06
猜你喜欢
  • 2021-09-27
  • 2021-12-17
  • 2022-02-09
  • 2021-11-25
  • 2021-09-11
  • 2021-11-13
  • 2022-01-31
相关资源
相似解决方案