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