簡體   English   中英

由於 Innodb 錯誤,MariaDB docker 未啟動

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM