[英]MariaDB docker not starting due to Innodb error
我的 Laravel 设置有一个本地 docker 环境 (MAC)。 docker docker-compose.yml
中的 mariadb 容器定义为
image: mariadb:10.6
container_name: ct-mariadb
restart: unless-stopped
ports:
- "3306:3306"
volumes:
- ./docker/storage/mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: ....
MYSQL_USER: ....
MYSQL_PASSWORD: ....
MYSQL_ROOT_PASSWORD: ....
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- laravel
该设置过去可以正常工作,但在测试了一些手动数据库更改后,它已损坏。 当通过 docker docker-compose up -d --build
(重新)启动容器时,mariadb 容器无法启动。 在容器日志中可以找到以下内容:
2022-05-05 23:13:17+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.7+maria~focal started.
2022-05-05 23:13:18+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-05-05 23:13:18+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.7+maria~focal started.
2022-05-05 23:13:18+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
2022-05-05 23:13:19+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.7+maria~focal started.
2022-05-05 23:13:19+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-05-05 23:13:19+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.7+maria~focal started.
2022-05-05 23:13:19+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
2022-05-05 23:13:20+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.7+maria~focal started.
2022-05-05 23:13:20+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2022-05-05 23:13:20+00:00 [Note] [Entrypoint]: Entrypoint script for MariaDB Server 1:10.6.7+maria~focal started.
2022-05-05 23:13:21+00:00 [Note] [Entrypoint]: MariaDB upgrade not required
2022-05-05 23:13:18 0 [Note] mariadbd (server 10.6.7-MariaDB-1:10.6.7+maria~focal) starting as process 1 ...
2022-05-05 23:13:18 0 [Warning] Setting lower_case_table_names=2 because file system for /var/lib/mysql/ is case insensitive
2022-05-05 23:13:18 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2022-05-05 23:13:18 0 [Note] InnoDB: Number of pools: 1
2022-05-05 23:13:18 0 [Note] InnoDB: Using ARMv8 crc32 + pmull instructions
2022-05-05 23:13:18 0 [Note] mariadbd: O_TMPFILE is not supported on /tmp (disabling future attempts)
2022-05-05 23:13:18 0 [Note] InnoDB: Using Linux native AIO
2022-05-05 23:13:18 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2022-05-05 23:13:18 0 [Note] InnoDB: Completed initialization of buffer pool
2022-05-05 23:13:18 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=507568654,515471506
2022-05-05 23:13:18 0 [ERROR] InnoDB: Missing FILE_CREATE, FILE_DELETE or FILE_MODIFY before FILE_CHECKPOINT for tablespace 230
2022-05-05 23:13:18 0 [ERROR] InnoDB: Plugin initialization aborted with error Data structure corruption
2022-05-05 23:13:18 0 [Note] InnoDB: Starting shutdown...
2022-05-05 23:13:19 0 [ERROR] Plugin 'InnoDB' init function returned error.
2022-05-05 23:13:19 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
2022-05-05 23:13:19 0 [Note] Plugin 'FEEDBACK' is disabled.
2022-05-05 23:13:19 0 [ERROR] Unknown/unsupported storage engine: InnoDB
2022-05-05 23:13:19 0 [ERROR] Aborting
我尝试通过 Docker 桌面 UI 和docker rm -f $(docker ps -a -q) docker rmi -f $(docker images -q)
多次删除所有容器、图像和卷,但在启动容器我再次得到完全相同的错误。
我不明白为什么/如何在完全删除所有容器、图像和卷之后,这个错误仍然会再次出现。
任何帮助深表感谢。
对谁有帮助......
尽管我使用以下命令清理了 docker 容器、图像和卷。
docker rm -f $(docker ps -a -q)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
docker system prune
我的 mariadb 定义引用了位于 ./docker/storage/mysql 中的本地卷
mariadb:
image: mariadb:10.6
container_name: ct-mariadb
restart: unless-stopped
ports:
- "3306:3306"
volumes:
- ./docker/storage/mysql:/var/lib/mysql
environment:
MYSQL_DATABASE: homestead
MYSQL_USER: homestead
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: secret
SERVICE_TAGS: dev
SERVICE_NAME: mysql
networks:
- laravel
清理我的项目 docker >> storage 文件夹后(基本上是重新提取我的项目。我可以再次启动 docker 而不会出现上述错误。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.