docker更新后,mysql无法在MacOS上的docker容器中启动

编程入门 行业动态 更新时间:2024-10-23 07:17:15
本文介绍了docker更新后,mysql无法在MacOS上的docker容器中启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我刚刚从2.3版升级到MacOS上的Docker Desktop 2.4。突然,我的mysql容器都无法启动。日志显示原因如下:

I just upgraded to Docker Desktop 2.4 on MacOS, from version 2.3. Suddenly none of my mysql containers will start. The logs show this as the reason:

Different lower_case_table_names settings for server ('2') and data dictionary ('0'). Data Dictionary initialization failed. Aborting

数据库文件已安装在主机上的某个卷中,因此它们在两次重新启动之间保持不变。

The database files are mounted in a volume on my host machine, so that they persist between restarts.

我终于弄清楚了原因。

I finally figured out why. Posting in order to answer.

推荐答案

使用最新的docker,您可以禁用gRPC Fuse进行文件共享。 (gRPC Fuse设置导致此问题,它与数据字典0不兼容)

With the latest docker you can disable the gRPC Fuse for file sharing. (the gRPC Fuse setting is causing this problem, it's incompatible with the data dictionary of 0)

这可以解决问题... 如果您愿意,可以在这里停下来,,但是要使用新的文件系统,您可以:

This fixes the problem... You can stop here if you're happy, but to use the new filesystem you can:

  • 禁用此复选框
  • 启动容器
  • 转储数据库
  • 启用此复选框
  • 确保您的数据文件夹为空(以便mysql创建新的数据字典)
  • 导入转储的数据库
  • Disable this checkbox
  • Start the container
  • Dump the database
  • Enable this checkbox
  • Make sure your data folder empty (so mysql creates a new data dictionary)
  • Import the dumped database

更多推荐

docker更新后,mysql无法在MacOS上的docker容器中启动

本文发布于:2023-11-17 04:41:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1608863.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:容器   docker   mysql   MacOS

发布评论

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

>www.elefans.com

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