-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mysql:8.4.2 tag can not init with Data Dictionary initialization failed #1082
Comments
Hmm, this is kind of a hard one to help narrow down -- I don't see a mount for |
yep,then the container will use volume, isn't it? |
我也遇到了这个情况。 我使用的是mysql:8.4.2,宿主机是VMware的CentOS-8 Client: Docker Engine - Community Server: Docker Engine - Community ================================================ 感觉应该是文件操作的权限问题,查看容器里的/etc/passwd文件: 我把宿主机上的映射文件/mysqldb改为: 所以不知道是不是容器里mysql用户id和宿主机用户id对应不上引起的。 [root@localhost /]# docker run --name mysql8 --rm -v /mysqldb:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 --privileged=true mysql:8.4.2 2024-09-12 12:42:38+00:00 [Note] [Entrypoint]: Stopping temporary server 2024-09-12 12:42:40+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up. 2024-09-12T12:42:40.419312Z 0 [System] [MY-015015] [Server] MySQL Server - start. ======================================================== Copyright (c) 2000, 2024, Oracle and/or its affiliates. Oracle is a registered trademark of Oracle Corporation and/or its Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> show databases mysql> =============================================== 希望作者能提供更安全的解决办法,谢谢 |
我重新在虚拟机中安装了CentOS8,精简化安装。然后重新pull and run mysql:8.4.2,成功运行了,不用加--privileged=true也没有问题了。 |
Nice, glad you got it figured out! |
Doh sorry, didn't remember this wasn't your thread. 🤦 |
加权限是不合适的。另外其实解决方法我是升级docker版本可以。但我不太理解。 |
老铁,你是升级到docker的哪个版本解决 |
忘了,大概是22之后吧 |
@lystormenvoy can you try these extra configs: |
Oooh, it could be a duplicate of #1058 |
Agreed, closing as duplicate of #1058; see also #1058 (comment) and docker-library/official-images#16829 |
The log show like
My create command:
My config file:
My docker version:
The text was updated successfully, but these errors were encountered: