如何解决“ mbind:不允许操作”在mysql错误日志中 [英] How to fix "mbind: Operation not permitted" in mysql error log

查看:808
本文介绍了如何解决“ mbind:不允许操作”在mysql错误日志中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的MySQL错误日志存在一个问题,该日志目前主要由 mbind:不允许操作行组成(请参见下文)。为什么会发生这种情况,我该如何解决?

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?

这是困扰我的大部分部分。如下所示,并非所有行都是 mbind:不允许操作。我怀疑应该用MySQL查询错误代替该行,但是由于某些原因它们无法写入文件中。

It's the "mostly" part that bothers me. As you can see below, not all lines are "mbind: Operation not permitted". I suspect that MySQL query errors should be instead of that line, but for some reason they can't be written into the file.

MySQL本身是一个Docker容器,其中日志文件通过以下方式进行卷:

MySQL itself is a Docker container where log files are volumed via:

volumes:
- ./mysql/log:/var/log/mysql

有趣的是:


  • docker logs mysql_container什么也没显示……

  • slow.log,它位于同一卷文件夹中,完全可以,并且其中的日志行很慢,没有无论如何, mbind:不允许操作!

  • 与slow.log一样,进入了general.log,在这里也没问题,

有什么想法吗?

2019-04-07T12:56:22.478504Z 0 [Warning] [MY-011070] [Server] 'Disabling symbolic links using --skip-symbolic-links (or equivalent) is the default. Consider not using this option as it' is deprecated and will be removed in a future release.
2019-04-07T12:56:22.478533Z 0 [Warning] [MY-011068] [Server] The syntax 'expire-logs-days' is deprecated and will be removed in a future release. Please use binlog_expire_logs_seconds instead.
2019-04-07T12:56:22.478605Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.15) starting as process 1
2019-04-07T12:56:22.480115Z 0 [Warning] [MY-013242] [Server] --character-set-server: 'utf8' is currently an alias for the character set UTF8MB3, but will be an alias for UTF8MB4 in a future release. Please consider using UTF8MB4 in order to be unambiguous.
2019-04-07T12:56:22.480122Z 0 [Warning] [MY-013244] [Server] --collation-server: 'utf8_general_ci' is a collation of the deprecated character set UTF8MB3. Please consider using UTF8MB4 with an appropriate collation instead.
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
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
[same line goes forever]

PS MySQL启动并运行良好,没有问题。只是这个error.log一直困扰着我,并阻止我看到实际的错误。

P.S. MySQL starts and runs well, no problem with that. It's just this error.log that keeps bothering me and prevents me from seeing actual errors.

推荐答案

添加功能 CAP_SYS_NICE 到您的容器,直到MySQL服务器可以静默地处理错误为止。

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

参考文献:

  • Docker Seccomp security profiles: https://docs.docker.com/engine/security/seccomp/
  • Docker resource constraints: https://docs.docker.com/config/containers/resource_constraints/

这篇关于如何解决“ mbind:不允许操作”在mysql错误日志中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆