更新了Docker Desktop后启动MySQL容器后报错了,主要错误日志如下:
2021-03-09T04:06:15.320914Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.18) starting as process 1
2021-03-09T04:06:15.328591Z 0 [Warning] [MY-010159] [Server] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2021-03-09T04:06:16.875007Z 1 [ERROR] [MY-011087] [Server] Different lower_case_table_names settings for server ('2') and data dictionary ('0').
2021-03-09T04:06:16.875283Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
2021-03-09T04:06:16.875614Z 0 [ERROR] [MY-010119] [Server] Aborting
2021-03-09T04:06:17.532571Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.18) MySQL Community Server - GPL.
这个问题是由于文件共享格式造成的,应该不止MySQL一个容器会存在这个问题,理论上可以通过改变容器的数据格式或修改Docker Desktop配置来解决问题,考虑到改变容器比较麻烦而且会带来各种问题,所以还是直接修改Docker Desktop配置好了。
打开Docker Desktop点右上角的“Settings”图标在“General”栏去掉勾选“Use gRPC FUSE for file sharing”(Uncheck to use the legacy osxfs file sharing instead.),然后点右下角的“Apply&Restart”等启动完再docker start mysql就可以正常运行MySQL容器了。
展开阅读全文
上一篇: 学习十四五时期主要目标任务