Docker下运行Mysql出现:mbind: Operation not permitted
//docker logs --tail="100" mysql-server-5.2.6
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
mbind: Operation not permitted
原因
- 这是Docker的Seccomp安全限制问题, 并且官方给出了指导和解释:https://docs.docker.com/engine/security/seccomp/
在docker-compose.yml中忽略docker的安全验证,
// 解决docker容器中的mysql安全认证问题
security_opt:
- seccomp:unconfined
version: '3.7'
services:
mysql:
image: mysql
container_name: mysql
# docker安全验证
security_opt:
- seccomp:unconfined
ports:
- 3306:3306