after installing mariadb with mysql already installed, i had issues and mysql wasent working so i tried to uninstall mysql and the package broke.
after frustrating hours of trying to fix this i stupidly deleted all the mysql files.
at the moment:
ive tried dpkg -l | grep mysql
, and get nothing
so i tried dpkg -l | grep mysql
and got,
mysql-client-8.0 install
mysql-client-core-8.0 install
mysql-common install
mysql-server-8.0 install
mysql-server-core-8.0 install
php7.4-mysql install
after trying to remove mysql-server-8.0:
sudo dpkg --remove --force-remove-reinstreq mysql-server-8.0
i get:
(Reading database ... 219264 files and directories currently installed.)
Removing mysql-server-8.0 (8.0.22-0ubuntu0.20.10.2) ...
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 start mysql.service: Unit mysql.service not found.
invoke-rc.d: initscript mysql, action "start" failed.
Unit mysql.service could not be found.
dpkg: error while cleaning up:
installed mysql-server-8.0 package post-installation script subprocess
returned error exit status 1
Errors were encountered while processing:
mysql-server-8.0
Is there a way to fix this and completely wipe mysql and then install mariadb??
If not i suppose the only way to fix this is to reinstall the os .
thanks!!
question from:
https://stackoverflow.com/questions/65949014/cannot-uninstall-mysql-server-8-0 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…