強制 killall mysql 後重啟失敗,常見三類錯誤及解決方案:
[ERROR] File './mysql-bin.000041' not found (Errcode: 13)
[ERROR] Can't init tc log
[ERROR] Aborting
解決:刪除 mysql/data/mysql-bin.index,重啟 MySQL 自動重建索引文件。
[ERROR] Disk is full writing './mysql-bin.~rec~' (Errcode: 28)
解決:進入 mysql/data/ 刪除過期 mysql-bin.* 文件釋放空間,重啟恢復。
[ERROR] Can't start server: Bind on TCP/IP port: Address already in use
解決:修改 my.cnf port 為新端口啟動驗證,確認原端口釋放後改回;或用 netstat -tnlp | grep 3306 定位殘留進程殺掉。
mysqladmin shutdown 或 service mysqld stop,避免強殺。expire_logs_days=7 自動清理舊 binlog。