如何解决“ mbind:不允许操作”在mysql错误日志中

编程入门 行业动态 更新时间:2024-10-27 02:23:40
本文介绍了如何解决“ 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安全配置文件: docs.docker/engine/security/seccomp/
  • Docker资源限制: docs.docker/config/containers/resource_constraints /
  • Docker Seccomp security profiles: docs.docker/engine/security/seccomp/
  • Docker resource constraints: docs.docker/config/containers/resource_constraints/

更多推荐

如何解决“ mbind:不允许操作”在mysql错误日志中

本文发布于:2023-10-23 04:22:37,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1519770.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不允许   如何解决   错误   操作   日志

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!