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

查看:567
本文介绍了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容器中启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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