使用 MySQL 5.6 安裝乾淨的 Trusty Tar 可能包含損壞的軟體包

使用 MySQL 5.6 安裝乾淨的 Trusty Tar 可能包含損壞的軟體包

我嘗試在我的流浪盒子上安裝 mysql-server-5.6ubuntu/trusty64 然而它適用於這個盒子。除了其他sources.list之外,我看不出有什麼區別。但我想知道為什麼會發生這個錯誤,因為第一個框是官方的 ubuntu 映像並使用主要的sources.list....

sudo apt-get install mysql-server-5.6

Setting up mysql-server-5.6 (5.6.19-0ubuntu0.14.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.6 (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-16) ...
E: Sub-process /usr/bin/dpkg returned an error code (1)

清除並重新安裝不會改變輸出。配置時將“root”的密碼留空不會改變任何內容。清除後手動刪除/var/lib/mysql沒有任何作用。 /var/lib/mysql設定全新安裝時似乎不存在,因此這應該不是問題。

/var/log/mysql/error.log 是這樣的,但我不知道它是什麼意思:

2015-09-29 18:05:21 6911 [Warning] Using unique option prefix myisam-recover instead of myisam-recover-options is deprecated and will be removed in a future release. Please use the full name instead.
2015-09-29 18:05:21 6911 [Note] Plugin 'FEDERATED' is disabled.
2015-09-29 18:05:21 6911 [Note] InnoDB: Using atomics to ref count buffer pool pages
2015-09-29 18:05:21 6911 [Note] InnoDB: The InnoDB memory heap is disabled
2015-09-29 18:05:21 6911 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2015-09-29 18:05:21 6911 [Note] InnoDB: Compressed tables use zlib 1.2.8
2015-09-29 18:05:21 6911 [Note] InnoDB: Using Linux native AIO
2015-09-29 18:05:21 6911 [Note] InnoDB: Not using CPU crc32 instructions
2015-09-29 18:05:21 6911 [Note] InnoDB: Initializing buffer pool, size = 128.0M
2015-09-29 18:05:21 6911 [Note] InnoDB: Completed initialization of buffer pool
2015-09-29 18:05:21 6911 [Note] InnoDB: Highest supported file format is Barracuda.
2015-09-29 18:05:21 6911 [Note] InnoDB: 128 rollback segment(s) are active.
2015-09-29 18:05:21 6911 [Note] InnoDB: Waiting for purge to start
2015-09-29 18:05:21 6911 [Note] InnoDB: 5.6.19 started; log sequence number 1626097
ERROR: 1062  Duplicate entry 'innodb' for key 'PRIMARY'
2015-09-29 18:05:21 6911 [ERROR] Aborting

2015-09-29 18:05:21 6911 [Note] Binlog end
2015-09-29 18:05:21 6911 [Note] InnoDB: FTS optimize thread exiting.
2015-09-29 18:05:21 6911 [Note] InnoDB: Starting shutdown...
2015-09-29 18:05:23 6911 [Note] InnoDB: Shutdown completed; log sequence number 1626107
2015-09-29 18:05:23 6911 [Note] /usr/sbin/mysqld: Shutdown complete

ERROR: 1062 Duplicate entry 'innodb' for key 'PRIMARY'似乎是錯誤的原因之一?我在 Ubuntu Launchpad 上發現了一個錯誤,但它從未修復,只是「過期」了。

答案1

這可能是由於 MySQL Server 5.6 記憶體不足。嘗試在 Vagrant 中為虛擬機器添加更多 RAM:

config.vm.provider "virtualbox" do |v|
    v.memory = 1024
end

使用 Vagrant 1.7.4 和 ubuntu/trusty64 鏡像進行測試。

相關內容