我正在使用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
时,出现以下结果:Unit mysql.service could not be found.
我希望您能帮忙安装并恢复MySQL的运行,但不想进行全新安装!如有帮助,请告知。