12.10如何重新安装 mysql?

作者:无名 - 电脑 -

问题:

软件升级失败了,它的中的一些事情是,mysql和我还没有把它备份。

可以疑原因:我有一个近完整的启动盘;升级完成之前填充磁盘,因这里把所有的东西都。 我给了系统更多磁盘并将/var 移动到自己的分区。 我仍然无法恢复 mysql。

以下是我在( 全部为 root ) 中尝试的。 首先,mysql不启动( 443 )。 尝试修复( 444,445 ) 失败。 试图删除mysql和() apparmor失败( 446,7,8 )。 一个更加能力去除mysql的尝试似乎成功了( 449 ),而且前面的错误不再看到( 450,1,2 )。 因为它不再存在于( 453 ) 中,所以无法重新配置,而是尝试重新安装旧的错误信息,我们返回到 square,我们返回到一个( 454 )。

我还检查了这个问题( 尽管在我的例子中,由于升级到 12.04,它没有中断: 在升级到1 年后,它已经在fixing修复了myslq服务器包,并尝试了在那里的建议,并没有任何可用的。

我还应该做什么?

this -generic #39-ubuntu smp 18:::::: x86_64/linux。

443 service mysql start

start: job failed to start

444 dpkg-reconfigure mysql-server-5.5

/usr/sbin/dpkg-reconfigure: mysql-server-5.5

is broken or not fully installed

445 apt-get -f install

. . .

setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1).. .

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

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

no apport report written because the error message

indicates its a followup error from a previous failure.

errors were encountered while processing:

mysql-server-5.5

mysql-server

e: sub-process/usr/bin/dpkg returned an error code (1)

446 apt-get remove mysql-server

. . .

removing mysql-server.. .

setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1).. .

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

no apport report written because maxreports is reached already

errors were encountered while processing:

mysql-server-5.5

e: sub-process/usr/bin/dpkg returned an error code (1)

447 apt-get remove apparmor

. . .

package 'apparmor' is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

1 not fully installed or removed.

after this operation, 0 b of additional disk space will be used.

setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1).. .

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)

448 apt-get remove mysql-server

reading package lists... done

building dependency tree

reading state information... done

package 'mysql-server' is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

1 not fully installed or removed.

after this operation, 0 b of additional disk space will be used.

setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1).. .

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)

449 dpkg -r mysql-server-5.5

(reading database.. . 322156 files and directories

currently installed.)

removing mysql-server-5.5.. .

processing triggers for man-db.. .

processing triggers for ureadahead.. .

450 apt-get remove mysql-server

reading package lists... done

building dependency tree

reading state information... done

package 'mysql-server' is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

451 apt-get remove apparmor

reading package lists... done

building dependency tree

reading state information... done

package 'apparmor' is not installed, so not removed

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

452 apt-get -f install

reading package lists... done

building dependency tree

reading state information... done

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

453 dpkg-reconfigure mysql-server-5.5

/usr/sbin/dpkg-reconfigure: mysql-server-5.5 is broken

or not fully installed

454 apt-get install mysql-server

reading package lists... done

building dependency tree

reading state information... done

the following extra packages will be installed:

mysql-server-5.5

suggested packages:

tinyca mailx

the following new packages will be installed:

mysql-server mysql-server-5.5

0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.

need to get 0 b/8,851 kb of archives.

after this operation, 32.8 mb of additional disk space

will be used.

do you want to continue [y/n]

preconfiguring packages.. .

selecting previously unselected package mysql-server-5.5.

(reading database.. . 322081 files and directories

currently installed.)

unpacking mysql-server-5.5 (from

. . ./mysql-server-5.5_5.5.29-0ubuntu0.12.10.1_amd64.deb).. .

selecting previously unselected package mysql-server.

unpacking mysql-server (from

. . ./mysql-server_5.5.29-0ubuntu0.12.10.1_all.deb).. .

processing triggers for ureadahead.. .

processing triggers for man-db.. .

setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1).. .

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

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

no apport report written because the error message

indicates its a followup error from a previous failure.

errors were encountered while processing:

mysql-server-5.5

mysql-server

e: sub-process/usr/bin/dpkg returned an error code (1)

458 apt-get remove --purge mysql-server

reading package lists... done

building dependency tree

reading state information... done

the following packages will be removed:

mysql-server*

0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.

2 not fully installed or removed.

after this operation, 116 kb disk space will be freed.

do you want to continue [y/n]

(reading database.. . 322159 files and directories

currently installed.)

removing mysql-server.. .

setting up mysql-server-5.5 (5.5.29-0ubuntu0.12.10.1).. .

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)

461 touch/etc/apparmor.d/local/usr.sbin.mysqld

(no output)

462 service mysql start

start: job failed to start


回答 1:

首先,删除 mysql:

sudo apt purge mysql-server mysql-client mysql-common

sudo apt autoremove

sudo rm -rf/var/lib/mysql*

然后重新安装:

sudo apt update

sudo apt install mysql-server

sudo mysql_install_db

sudo/usr/bin/mysql_secure_installation


回答 2:

在 ubuntu 16.04中,在我的例子中修复它的方法是( 请先备份 dbs,数据库将丢失。):

sudo apt remove --purge mysql-server mysql-client mysql-common

sudo apt autoremove

sudo rm -rf/var/lib/mysql*

sudo apt install mysql-server

( 我以前对 apt purge mysql-server的调用似乎并没有成功。 我认为 apt purge foo 等价于 apt remove --purge foo 。)


回答 3:

我正在获得完全同样的错误,并尝试了大多数步骤,同样的结果。 以下最后为我工作。

apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5

在那之后,mysql正常安装。


回答 4:

我不确定是什么情况,但它的他解决方案没有工作,它保持了一个错误。 我试过这个 apt-get purge mysql-* 然后是 autoremoveautoclean。 在安装完成之后。

**

确保备份数据库,上面的命令可能也会删除它们

**


回答 5:

如果你只是

sudo apt-get update

sudo apt-get install mysql-server

它将更新 mysql,这修复了我更新到 16.04的问题。

或者运行

sudo apt-get install lamp-server^

更新所有服务器包。


回答 6:

对于版本 mysql 5.7,我按照前面所述删除了 mysql:

sudo apt purge mysql-server mysql-client mysql-common

sudo apt autoremove

sudo rm -rf/var/lib/mysql*

并用帮助安装了它:

sudo apt-get update

sudo apt-get install mysql-server

mysql_secure_installation

要测试一切是否正常:

systemctl status mysql.service

源代码


回答 7:

从默认的ubuntu仓库安装 phpmyadmin。 然后运行:

dpkg --configure mysql-server-5.5

apt-get purge mysql-server mysql-client mysql-common mysql-client-5.5 mysql-server-5.5

apt-get autoremove

apt-get autoclean

apt-get update

apt-get install mysql-server

service mysql restart




文章标签:reinstall

以上就是由(IT人知识库http://www.itpeo.net/389619/4642740.html)本站为大家整理





在 gnome shell 中,打印如何添加打印机

问题:我正在使用 gnome shell ( 虽然我不确定"打印机"应用程序是其中的一部分,或者只是gnome的一部分) ...

rfedfre

社区如何在Ubuntu代码中签名?

问题:为了向某些项目提交补丁和项目,并限定为 ask ubuntu moderator ubuntu我需要对执行cond ...

在ls中,bash排除某些文件

问题:我想运行ls并排除输出中的某些文件。运行以下命令时,将在一行中获取所有文件:$ ls -1file1file2fi ...

orca如何阻止Ubuntu与我交谈?

问题:这个标题听起来可能很愚蠢,但是在 ubuntu 13.10上,我经常使用文本进行语音通知。这是"语音分配器",我怎 ...

如何从 命令行 获取文件的mime类型?

问题:我试图从 命令行 中获取文件的mime类型,如打印字符串( 例如。 application/vnd.oasis.o ...

小数点后,命令行 bc: 设置位数

问题:bc 将数字作为整数处理:# echo"100/3" | bc33bc -l 将数字处理为浮点对象:# echo" ...

要从终端运行 Chrome,应键入什么命令?

问题:我有 vnc 和 jwm 桌面访问的远程框。没有菜单,没有桌面图标,只有终端窗口。我下载了的chrome ,deb ...

10.10如何挂载. cue 文件?

问题:我有一个不是. iso的cd图像,但是. cue. 不能挂载它。 我使用ubuntu位,并且尝试了许多程序。 fu ...

rfedfre

加密有一个工具可以将密码添加到PDF文件中?

问题:我在解密pdf文件时发现了很多信息,但没有对它们进行加密。 什么工具可以为我做这个?编辑:下面有两个好的答案,但在 ...

卸载删除文档以节省硬盘空间

问题:我想在虚拟箱机器中创建一个相当小的ubuntu安装。 它基本上应该提供tex和相关工具。 我想现在我在 /usr/ ...

rfedfre

将Google小工具添加到桌面

计算的一个新趋势是使用桌面小工具,它是在桌面上运行的小型应用程序。 如果你喜欢今天的桌面小工具,我们将查看google可 ...

rfedfre

在Word中,使用图像占位符快速显示文档

有时,当我们获得 with word文档时,可以使用几个或者大量的图像来打开它。 这里我们将查看如何快速显示文档文本,然 ...

rfedfre

将你的XP计算机转换为现代外观

我相信大多数人都很累看云和卡通,像 windows xp的样子。 今天我们将在一个转换包中看到一些免费的现代外观。使用了 ...

rfedfre

CodySafe是PortableApps的替代品

of允许你在usb棒上运行你最喜欢的开源应用程序,这是最酷的项目之一。 今天我们将看 codysafe,它是一个类似的项 ...

rfedfre

小丑娱乐:玩异国游戏游戏

alien engine是基于quake引擎的完全自由交叉平台。 今天我们会看看,因为geeks喜欢酷游戏和免费酷游戏更 ...

rfedfre

使用 Windows 扩展提高生产力

通过几个菜单查找常用的应用程序和实用程序可能非常烦人。 今天,我们将看一个程序,它为更快的计算和提高生产力增加了额外的功 ...

rfedfre

如何使用桌面驱动器轻松查找驱动器

windows 最大的烦恼之一是插入 usb flash 驱动器,听到响声和驱动器不在我的电脑里。 今天我们将看到免费的 ...

rfedfre

在 Outlook 中使用 YouSendIt,如何发送大文件

你是否需要向大型文件发送电子邮件,但你的it部门将附件限制为 10mb 或者更低? 今天我们将看一个插入 outlook ...

rfedfre

使用Folderico更改文件夹颜色和主题

如果你已经烦烦了 windows 中的淡色文件夹或者想要更快的访问代码,今天我们将看看 folderico。folder ...

rfedfre

在 Windows 7中,如何管理操作中心

在 windows 7中,当你每次打开计算机时,看到操作中心 icon 弹出通知会令人烦恼。 今天我们将看一下它显示的消 ...