How to fix “mbind: Operation not permitted” in mysql error log

后端 未结 2 1019
梦如初夏
梦如初夏 2020-12-28 14:11

I have a problem with my MySQL error log which currently mostly consists of \"mbind: Operation not permitted\" lines (see below). Why does it happen and how do I fix it?

相关标签:
2条回答
  • 2020-12-28 15:08

    Add the capability CAP_SYS_NICE to your container until MySQL server can handle the error itself "silently".

    service:
      mysql:
        image: mysql:8.0.15
        # ...
        cap_add:
          - SYS_NICE  # CAP_SYS_NICE
    

    References:

    • Docker Seccomp security profiles: https://docs.docker.com/engine/security/seccomp/
    • Docker resource constraints: https://docs.docker.com/config/containers/resource_constraints/
    0 讨论(0)
  • 2020-12-28 15:09

    Adding the security_opt option in docker-compose.yml helped to solve this problem:

    database:
      image: mysql:latest
      container_name: mysql_0
      ports:
        - "3306:3306"
      security_opt:
        - seccomp:unconfined
    
    0 讨论(0)
提交回复
热议问题