18.04 LTS -> 20.04 LTS leaves mysql broken. Unsupported upgrade path
Solution 1:
You have a few options in front of you:
- Wipe MySQL clear off the system, remembering to delete the
/etc/mysql
directory as well, then reinstall and restore from the most recent backup - Fire up a VM, install MySQL 5.7 (yes, 5.7), stop the database, copy your existing
/etc/mysql
files to the VM's data directory, start MySQL and have it upgrade your tables, then:- use
mysqldump
to extract the data and load that into your 20.04 installation, or … - upgrade the VM to MySQL 8.0, then copy the newly updated data files to your 20.04 installation
- use
- Fire up a Docker container for an instance of MySQL between the version you were running and the most recent 5.7, and just run your database from there
There are a few other options, but they're more work and do not offer any perceivable benefits over the three options above. Generally when I've had to deal with this sort of situation, Option 2 has been the fastest path to success.