Docker加載/var/lib/mysql出現Permission Denied 原因:Selinux安全權限問題
問題:
解決方法:1. 自己用docker run來運行容器時, 加上 --privileged=true 即可。
2. 一勞永逸的辦法:直接關閉Selinux
[root@localhost ~]# getenforce Enforcing [root@localhost ~]# setenforce 0 [root@localhost ~]# getenforce Permissive [root@localhost ~]# systemctl restart docker [root@localhost ~]# vi /etc/selinux/config #修改 SELINUX=disabled [root@localhost ~]# init 6 #重啟系統