Mysql

在 debian wheezy 上 mysql 升級到 5.5 失敗

  • September 17, 2013

將 debian squeeze 升級到 wheezy 時,mysql 升級到mysql-server-5.5失敗:

# apt-get dist-upgrade -u
...
Setting up mysql-server-5.5 (5.5.31+dfsg-0+wheezy1) ...
[ ok ] Stopping MySQL database server: mysqld.
...
[FAIL] Starting MySQL database server: mysqld . . . . . . . . . . . . . . failed!
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.5 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.5; however:
 Package mysql-server-5.5 is not configured yet.

dpkg: error processing mysql-server (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.5
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

當我執行/usr/bin/mysqld_safe --skip-syslog時,生成的日誌文件會重複此消息:

130520 23:54:23  InnoDB: Error: trying to access tablespace 1 page no. 2,
InnoDB: but the tablespace does not exist or is just being dropped.

據我所知,我沒有任何 InnoDB 表。

做什麼?--purge除非絕對必要,否則我不想使用mysql。

我的目錄中似乎有與 innoDB 相關的文件(ibdata1ib_logfile等)/var/lib/mysql/。根據這個郵件列表文章中的建議,我跑了rm ib*又重新跑apt-get dist-upgrade。一切似乎都奏效了。

我在我的 /etc/apt/sources.list 中有 debian backports,我只是盲目地用 wheezy 替換了單詞擠壓,而沒有檢查我正在使用的儲存庫。當我進行 dist-upgrade 時,我最終得到了與您看到的類似的結果。

刪除 backports repos(如果有的話)並進行更新/升級。

引用自:https://serverfault.com/questions/509410