docker 更新后,Mysql 未在 MacOS 上的 docker 容器中启动 [英] Mysql not starting in a docker container on MacOS after docker update

查看:42
本文介绍了docker 更新后,Mysql 未在 MacOS 上的 docker 容器中启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在 MacOS 上从 2.3 版升级到 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 创建一个新的数据字典)
  • 导入转储的数据库

更新

自 2.5 版起,该设置已移至实验功能"页面:

Since version 2.5, the setting has been moved to the 'experimental features' page:

这篇关于docker 更新后,Mysql 未在 MacOS 上的 docker 容器中启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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