Ubuntu
新貴的Mysql沒有啟動
今天早上更新後,我們遇到了一些奇怪的問題。首先
apt-get upgrade
在配置過程中失敗,並顯示無法啟動服務的消息。然後我們嘗試了dpkg-reconfigure
,apt-get purge
然後是apt-get install
andapt-get install --reinstall
,但沒有運氣。經過一段時間的嘗試,我們嘗試
mysqld
以 root 身份執行:# mysqld --verbose 130809 15:31:15 [Note] Plugin 'FEDERATED' is disabled. 130809 15:31:15 InnoDB: The InnoDB memory heap is disabled 130809 15:31:15 InnoDB: Mutexes and rw_locks use GCC atomic builtins 130809 15:31:15 InnoDB: Compressed tables use zlib 1.2.3.4 130809 15:31:15 InnoDB: Initializing buffer pool, size = 128.0M 130809 15:31:15 InnoDB: Completed initialization of buffer pool 130809 15:31:15 InnoDB: highest supported file format is Barracuda. 130809 15:31:15 InnoDB: Waiting for the background threads to start 130809 15:31:16 InnoDB: 5.5.32 started; log sequence number 357746282514 130809 15:31:17 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306 130809 15:31:17 [Note] - '0.0.0.0' resolves to '0.0.0.0'; 130809 15:31:17 [Note] Server socket created on IP: '0.0.0.0'. 130809 15:31:17 [Note] Event Scheduler: Loaded 0 events 130809 15:31:17 [Note] mysqld: ready for connections. Version: '5.5.32-0ubuntu0.12.04.2-log' socket: '/var/run/mysqld/mysqld.sock' port: 3306 (Ubuntu)
它工作正常。因此,在探勘日誌文件時,我們注意到以下內容:
130809 10:15:37 InnoDB: Starting shutdown... 130809 10:15:39 InnoDB: Waiting for 200 pages to be flushed 130809 10:16:02 InnoDB: Shutdown completed; log sequence number 357736350943 130809 10:16:02 [Note] /usr/sbin/mysqld: Shutdown complete /proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found /proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found /proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found /proc/self/fd/9: 1: /proc/self/fd/9: mysqld_get_param: not found
10:15 是升級開始的時間。每次我們嘗試
mysql-server
使用 init.d 腳本或service mysql start
命令啟動它時,它都會像最後 4 行一樣簡單地添加另一行。因此,雖然我們可以在 a 中執行伺服器
screen
並在每次伺服器重新啟動時手動啟動它,但這很煩人。我們可以做些什麼來解決它嗎?
自上週五更新以來,我遇到了同樣的問題。有一個舊的 Ubuntu 錯誤已經存在了很長一段時間,這似乎是相關的:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/973951
該執行緒中建議了各種修復/解決方法(包括一些清除+重新安裝),但最近發布的解決方法對我有用,也可能對您有用:
https://bugs.launchpad.net/ubuntu/+source/mysql-5.5/+bug/973951/comments/37
祝你好運。