Score:-1

How to remove an incomplete install for a fresh install, if all actions I can think of--remove, purge--fail with an error

mn flag

An attempt to install 'mysql' on 'Ubuntu 20.04' failed and left my system in an undefined state. I would like to go back to square one for a fresh start, but both 'remove' and 'purge' fail with both 'apt' and 'dpkg'. 'install' fails: 'E: Package 'mysql' has no installation candidate'. This looks like a deadlock, all exits barred:

fr@hatchbox-3:$ which mysql
/usr/bin/mysql
 
fr@hatchbox-3:$ /usr/bin/mysql --version
/usr/bin/mysql  Ver 8.0.33-0ubuntu0.20.04.2 for Linux on x86_64 ((Ubuntu))

fr@hatchbox-3:$ mysql -p
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysql/mysqld.sock' (2)
# As expected. At the current stage I don't have mysqld.

fr@hatchbox-3:$ sudo apt -s remove mysql    # 'purge': response is identical
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package 'mysql' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

fr@hatchbox-3:$ sudo dpkg --simulate --remove mysql
dpkg: warning: ignoring request to remove mysql which isn't installed

What other options do I have to erase what ever shreds of mysql remain? I am most reluctant to go in with buck shot, as it were, and blow away everything with 'mysql' in its name. Once gotten rid of 'mysql' residue, I face the challenge of picking the correct downloads out of several, probably among these:

fr@hatchbox-3:$ sudo apt-cache search mysql | grep -w mysql | grep 8\.0
mysql-client-8.0 - MySQL database client binaries
mysql-client-core-8.0 - MySQL database core client binaries
mysql-server-8.0 - MySQL database server binaries and system database setup
mysql-server-core-8.0 - MySQL database server binaries
mysql-source-8.0 - MySQL source
mysql-testsuite-8.0 - MySQL 8.0 testsuite
pike8.0-mysql - MySQL modules for Pike
mysql-shell - MySQL Shell (part of MySQL Server) 8.0

Thanks for any guidance

Frederic

hu flag
Fresh start usually means a reinstall. There is no way to do it with apt.
user535733 avatar
cn flag
It's important to learn lessons from a failure lest you simply repeat them: Ask Yourself: Why was the install "incomplete?" What mistakes did you make that led to "shredded" removal?
magpie avatar
mn flag
I am the OP. Thanks all respondents. Why was the install incomplete? Because it aborted with an arcane error message that sent me scouring forums and hacking trial-and-error style, making things worse. Anyway, my post is a snapshot of the current situation. Where do I go from here? My idea was to purge all mysql residue in one or another way and do fresh install. Alas, I seem to be locked in a situation which I can escape neither retreating nor advancing. I hope to "get by with a little help of my friends".
magpie avatar
mn flag
OP again. I find tons of extensive discussions on installation issues and have for the past four weeks been googling for successful solutions. However, following an account step by step stops short when a recommended action fails to produce the documented result. At that point the choice is between attack and retreat. That's where I'm at. Unfortunately, either choice fails with either apt or dpkg. Removing all files with 'mysql' in their name seems to be my last resort. I remember a thread that reported a successful application of this method. Another one, again, warned against it.
Score:0
mn flag

Thank you fku, mmp, hmp. Your guidance was successful. I got rid of the bothersome stuff. mmp recommends to install mysql-server-8.0. Does that give me a fully functional datable management system? I mean, don't I need a mysql-client-8.0 as well? Let me back up a bit: the ultimate goal of this exercise is to continue database management after an old machine broke down. I now have at my disposal: a new machine running Ubuntu 20.04 and a backup-disk with some eighty myisam tables. Extensive research leaves me with the apprehension that mysql-8.0 does not read the myisam format. mysql-5.7 does and is still available, but not for Ubuntu 20--officially that is. It takes some hacking, forums helping. Once I have my data in a portable transfer format, like CSV, I can resume work, eventually with PostgrSQL. If there is a tool myisam-to-csv out there I haven't found it, try as I would.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.