dist 将 Ubuntu 升级到 Ubuntu 20.04 后 mysql 不起作用。我尝试删除它,我的目标是重新安装它。问题是我无法删除mysql-server-8.0:
sudo dpkg -r --force-all mysql-server-8.0
(Reading database ... 210243 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.28-0ubuntu0.20.04.3) ...
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
dpkg: error processing package mysql-server-8.0 (--remove):
installed mysql-server-8.0 package pre-removal script subprocess returned error exit status 1
Failed to stop mysql.service: Unit mysql.service not loaded.
invoke-rc.d: initscript mysql, action "stop" failed.
Failed to preset unit: File mysql.service: …Run Code Online (Sandbox Code Playgroud)