我刚刚从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容器中启动
发布评论