Mysql not starting in a docker container on MacOS after docker update(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 容器中启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:docker 更新后,Mysql 未在 MacOS 上的 docker 容器中启动


基础教程推荐
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- 带更新的 sqlite CTE 2022-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01