I really messed up my mysql installation trying to rapidly setup Owncloud on a new install of Ubuntu 20.04 LTS server. Sadly I already setup many services that are running well, so I just want to completely purge mysql and setup again from scratch. I have tried following various tutorials about
sudo apt-get purge mysql*
However, all variations end with this very similar error and I cannot continue and trying to ignore and re-install mysql just fails. How can I force remove all mysql of this box and start that again?
Thanks for any help.
Error: (Reading database … 160886 files and directories currently installed.) Removing mysql-server-8.0 (8.0.23-0ubuntu0.20.04.1) … 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 dpkg: too many errors, stopping 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 Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1)
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $200 of credit to try our products over 60 days!