MySQL 无法在 Ubuntu 11.04 上安装

标签 mysql ubuntu installation

它之前工作正常,当我重新启动 mysql(通过/etc/init.d/mysql restart)时,我正在配置电子邮件服务器。我很确定我没有碰那里的任何东西,但我记得在那之前做了一次失败的 apt-get 更新。

现在我的问题突然停止,甚至不会开始。我在谷歌上搜索,甚至彻底清除所有内容并进行新安装。但它仍然不会让我正确安装 mysql。

我已经尝试过(在删除 --purge 之后):

sudo apt-get install mysql-server-5.5 mysql-client-5.5

它提示我输入根密码,但返回以下错误:

Unable to set password for the MySQL "root" user                                                      

  An error occurred while setting the password for the MySQL administrative user. This may have         
  happened because the account already has a password, or because of a communication problem with the   
  MySQL server.                                                                                         

  You should check the account's password after the package installation.                               

  Please read the /usr/share/doc/mysql-server-5.5/README.Debian file for more information. 

我也有以下日志:

Selecting previously deselected package mysql-server-5.5.
(Reading database ... 117879 files and directories currently installed.)
Unpacking mysql-server-5.5 (from .../mysql-server-5.5_5.5.32-0ubuntu0.12.04.1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for ureadahead ...
Setting up mysql-server-5.5 (5.5.32-0ubuntu0.12.04.1) ...
130830 14:13:26 [ERROR] Can't find messagefile '/usr/share/mysql/errmsg.sys'
start: Job failed to start
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
Errors were encountered while processing:
 mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)

有什么帮助吗?提前致谢。

最佳答案

这个问题与通过卸载解决的问题相同,但在此之前他尝试设置密码 question然后他试图在 chat 中解决它也许当您尝试设置密码时它会被解决,只需尝试

更新:在您的终端中输入以下命令以完全删除 mysql。

sudo apt-get remove --purge mysql-server mysql-client mysql-common
sudo apt-get autoremove
sudo apt-get autoclean

如果存在/var/lib/mysql 文件夹,您还需要通过键入以下命令删除

sudo rm -rf /var/lib/mysql

然后按照official ubuntu documentation安装。并且不要忘记在安装过程中设置您的 mysql 密码。

另见 question它类似于您在安装过程中遇到的错误。

关于MySQL 无法在 Ubuntu 11.04 上安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18526315/

相关文章:

mongodb - mongo db.shutdownServer() 期间出错

python - 在运行 Leopard 的 Mac 上安装 Django

c++ - 如何安装 SOIL(简单 OpenGL 图像加载器)?

python - 安装 Flask 时出错 - Python

php - apache 必须先安装 php 或 mysql 吗?

php - SQL 语句的问题 - 使用 PHP 查询数据库

MySQL - 在数字范围内查找最接近的匹配

mysql - 根据select语句编写SQL删除

php - 使用 Curl 代理发布数据不返回任何内容

Ubuntu 18.04 Visual Studio 代码中的 C++ gdb pretty-print