專案

一般

配置概況

動作

Bug #163

已結束

207 mysql掛掉

是由 martin zhuo10 個月 前加入. 於 10 個月 前更新.

狀態:
Close
優先權:
LOW
被分派者:
開始日期:
2025-04-29
完成日期:
2025-04-29
完成百分比:

0%


概述

學習系統使用的mysql 因W7主機當機事件,導致DB掛掉
mysql config:

DB_ENGINE=mysql+pymysql
DB_NAME=veriid_training_report
DB_HOST=192.168.10.207
DB_PORT=3306


檔案


相關的議題清單 1 (0 進行中1 已結束)

關聯至 System架構及環境 - Maintain #158: 4/26 星期六 207&掛在底下VM的caddy 失聯Closeandy chiang2025-04-262025-04-28

動作

是由 martin zhuo10 個月 前更新

修復後可連接DB,但table的資料遺失

是由 martin zhuo10 個月 前更新

  • 關聯至 Maintain #158: 4/26 星期六 207&掛在底下VM的caddy 失聯 已新增

是由 andy chiang10 個月 前更新

排查:
2025-04-29T05:33:33.582586Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
2025-04-29T05:33:33.583733Z 0 [System] [MY-013169] [Server] /opt/bitnami/mysql/bin/mysqld (mysqld 8.1.0) initializing of server in progress as process 44
2025-04-29T05:33:33.584658Z 0 [ERROR] [MY-010460] [Server] --initialize specified but the data directory exists and is not writable. Aborting.
2025-04-29T05:33:33.584692Z 0 [ERROR] [MY-013236] [Server] The designated data directory /bitnami/mysql/data/ is unusable. You can remove all files that the server added to it.
2025-04-29T05:33:33.584715Z 0 [ERROR] [MY-010119] [Server] Aborting
2025-04-29T05:33:33.584799Z 0 [System] [MY-010910] [Server] /opt/bitnami/mysql/bin/mysqld: Shutdown complete (mysqld 8.1.0) Source distribution.
2025-04-29T05:33:33.584934Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.

錯誤1:

  • 查看 volume 是否正確: 正確

  • 將 yml version: '2.1'改為 '3'

錯誤2:
ERROR: for mysql 'ContainerConfig'
Traceback (most recent call last):
File "/usr/bin/docker-compose", line 33, in
sys.exit(load_entry_point('docker-compose==1.29.2', 'console_scripts', 'docker-compose')())

  • 將 docker compose 刪除,安裝新版本

錯誤3:
2025-04-29T05:52:14.763554Z 0 [System] [MY-010931] [Server] /opt/bitnami/mysql/bin/mysqld: ready for connections. Version: '8.1.0' socket: '/opt/bitnami/mysql/tmp/mysql.sock' port: 3306 Source distribution.
find: '/docker-entrypoint-startdb.d/': No such file or directory
mysql 05:52:16.61 INFO ==> Stopping mysql

  • 在 yml 新增 entrypoint,禁用入口點腳本
    entrypoint: ["/opt/bitnami/mysql/bin/mysqld", "--defaults-file=/opt/bitnami/mysql/conf/my.cnf"]

重啟容器後,已恢復正常。結案

動作

匯出至 Atom PDF