加载/安装 mysql 时遇到问题
这是安装时的输出:
mysql-server-5.1
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/6,258 kB of archives.
After this operation, 13.5 MB of additional disk space will be used.
Preconfiguring packages ...
Selecting previously deselected package mysql-server-5.1.
(Reading database ... 256988 files and directories currently installed.)
Unpacking mysql-server-5.1 (from .../mysql-server-5.1_5.1.54-1ubuntu4_i386.deb) ...
Processing triggers for ureadahead ...
Processing triggers for man-db ...
Setting up mysql-server-5.1 (5.1.54-1ubuntu4) ...
110810 11:01:32 [Note] Plugin 'FEDERATED' is disabled.
110810 11:01:32 InnoDB: Initializing buffer pool, size = 8.0M
110810 11:01:32 InnoDB: Completed initialization of buffer pool
110810 11:01:32 InnoDB: Started; log sequence number 0 44233
110810 11:01:33 InnoDB: Starting shutdown...
110810 11:01:38 InnoDB: Shutdown completed; log sequence number 0 44233
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing mysql-server-5.1 (--configure):
subprocess installed post-installation script returned error exit status 1
E: Sub-process /usr/bin/dpkg returned an error code (1)
如果有人能帮忙我将不胜感激
答案1
诊断此问题的最佳方法是查看/var/log/mysql/error.log
这应该会显示 MySQL 启动失败的原因。如果您可以修复该问题,请尝试:
dpkg --configure -a
完成安装您的软件包。
如果你无法修复它,你应该能够使用以下命令完全删除 mysql
apt-get purge mysql-server-5.1
答案2
sudo dpkg-reconfigure mysql-server-5.1
如果您有 mysql 5.1(ubuntu 11.04 和 11.10)请按照说明进行操作(新密码...等)
然后重新启动
对于 Ubuntu 12.04: sudo dpkg-reconfigure mysql-server-5.5
答案3
我遇到过类似的问题,结果发现 /etc/mysql/my.cnf 配置不正确。当出现问题时,很难看到发生了什么,这有点令人烦恼。
答案4
你好,我在 12.04 版的 Mysql 上也遇到了类似的问题。
我必须将mysql-common
其移除然后重新安装。这样做之后一切都很顺利,虽然花了 2 个小时;)
已安装emma
/workbench
和凭据保存在每次创建冲突中。删除mysql-common
可消除这些冲突