Mariadb
Mariadb/docker 錯誤:無法初始化 tc 日誌
我試圖對 MariaDB 進行 docker 化。它執行良好,直到崩潰,這是日誌:
2016-11-21 15:25:21 140091445393344 [Note] mysqld (mysqld 10.1.14- MariaDB-1~jessie) starting as process 1 ... 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Using mutexes to ref count buffer pool pages 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: The InnoDB memory heap is disabled 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Memory barrier is not used 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Compressed tables use zlib 1.2.8 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Using Linux native AIO 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Using SSE crc32 instructions 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Initializing buffer pool, size = 256.0M 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Completed initialization of buffer pool 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Highest supported file format is Barracuda. 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: 128 rollback segment(s) are active. 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Waiting for purge to start 2016-11-21 15:25:21 140091445393344 [Note] InnoDB: Percona XtraDB (http://www.percona.com) 5.6.29-76.2 started; log sequence number 49590423178 2016-11-21 15:25:21 140090688898816 [Note] InnoDB: Dumping buffer pool(s) not yet started 2016-11-21 15:25:21 140091445393344 [Note] Plugin 'FEEDBACK' is disabled. 2016-11-21 15:25:21 140091445393344 [Note] Recovering after a crash using tc.log 2016-11-21 15:25:21 140091445393344 [ERROR] Can't init tc log 2016-11-21 15:25:21 140091445393344 [ERROR] Aborting
我在想這是一個磁碟問題,但不,我有 14G 可用。
我最終刪除了 /var/lib/mysql 中的 tc.log 文件。當我再次啟動 mysql 時,它創建了一個新的 tc.log 並啟動。
sudo rm -f /var/lib/mysql/tc.log
這是在 Windows boot2docker 上嗎?不幸的是,似乎沒有適當的解決方案 - https://github.com/docker-library/mariadb/issues/38。
我通過清空主機數據目錄來“修復”這個問題(只有在它是一次性且安全的情況下才這樣做!),一次又一次地使用
mariadb:10.0.20
圖像docker-compose up
。有點垃圾,但它可以讓事情正常執行。如果有人知道適當的解決方案,請告訴我,我會適當地編輯我的答案。