我使用的是 Ubuntu 17.04。
长话短说,在与 MariaDB 进行了一些斗争之后,我遵循了一些关于如何完全地从我的家庭服务器中删除 MySQL 和 MariaDB。现在我无法重新安装mysql-server
。当我尝试时出现此错误:
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
invoke-rc.d returned 5
There is a MySQL server running, but we failed in our attempts to stop it.
Stop it yourself and try again!
所以我检查服务sudo service --status-all | grep mysql
,果然……
[ - ] mysql
问题是,当我尝试sudo service mysql status
, I get
Unit mysql.service could not be found.
我真的很想安装 MySQL 并再次工作,而无需进行全新安装!任何帮助表示赞赏。
看来我明白了。这没有任何意义,但我明白了。首先,我问dpkg
是否还有 mysql 软件包:
sudo dpkg --get-selections | grep mysql
什么也没发生,所以我检查了 MariaDB:
sudo dpkg --get-selections | grep maria
这显示了一些标记为卸载的软件包。
mariadb-client-10.1 deinstall
mariadb-common deinstall
mariadb-server-10.1 deinstall
Since apt
不合作,我卸载了每一个dpkg -P
。一旦我这样做并重新启动,mysql就不再被列为服务并且mysql-server
安装完美。希望这可以节省其他人的时间。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)