Bug #163
已結束207 mysql掛掉
0%
概述
學習系統使用的mysql 因W7主機當機事件,導致DB掛掉
mysql config:
DB_ENGINE=mysql+pymysql
DB_NAME=veriid_training_report
DB_HOST=192.168.10.207
DB_PORT=3306
檔案
是由 andy chiang 於 10 個月 前更新
- 檔案 clipboard-202504291422-kgg9s.png clipboard-202504291422-kgg9s.png 已新增
- 完成日期 設定為 2025-04-29
- 狀態 從 New 變更為 Close
排查:
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"]
重啟容器後,已恢復正常。結案
是由 andy chiang 於 10 個月 前更新
