【问题标题】:MySQL Won't Install on Ubuntu 11.04MySQL 不会在 Ubuntu 11.04 上安装
【发布时间】:2013-08-30 06:24:23
【问题描述】:

它之前工作正常,当我重新启动 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)

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

【问题讨论】:

    标签: mysql ubuntu installation


    【解决方案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,它与您在安装过程中遇到的错误类似。

    【讨论】:

    • 我做了一些卸载然后重新安装。我什至更新了 Ubuntu 版本,但仍然没有成功。
    • 我不明白你说的密码是什么意思。你指的是mysql的root账户吗?如果是,那么答案是否定的。这个错误实际上是在系统上重新安装 mysql-server 时发生的。我似乎无法继续安装它,因为它给我带来了这个错误。
    • 感谢您写下详细信息。不幸的是,我已经多次尝试该方法,但仍然出现错误并且无法安装 mysql。出现与问题中列出的相同的错误。
    • 经过一番搜索,这似乎解决了我的问题。谢谢!
    【解决方案2】:

    我遇到了这个问题。 也许 aptitude 有一些包配置。 我认为这个干扰问题 虽然,这种方法是清除命令。 尝试运行。

    1. 检查安装的mysql包

      dpkg --get-selections|grep mysql

    2. 删除

      apt-get remove --purge [已安装的软件包]
      apt-get 自动删除
      apt-get 自动清洁
      aptitude purge [已安装的软件包]
      清洁能力
      能力更新
      aptitude -f 安装
      aptitude 全面升级

    3. 安装

      apt-get 安装 mysql-server

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-08-11
      • 1970-01-01
      相关资源
      最近更新 更多