If you cannot find an archive for Mysql then try manually installing the archive.
First, Try if downloading the deb file works:
sudo apt download mysql-server-8.0
Now, using dpkg
compile the archive:
sudo dpkg -i --force-all ./*.deb
If the above didn't work then try:
First, click here, and a deb file will start downloading.
After that use the dpkg -i
command to install the .deb
file.
I am not sure but you can also run the following command to download the deb and install it:
wget https://dev.mysql.com/get/mysql-apt-config_0.8.20-1_all.deb && sudo dpkg -i *.deb
After, running the above:
sudo apt install mysql-server-8.0
If the above didn't work then purge
MySQL:
sudo dpkg -P mysql*
Here is another way to remove MySQL:
sudo mv /var/lib/dpkg/info/mysql* ~/ && sudo apt -f install
If the above all didn't work then one last thing to try is:
First, change the contents of /etc/apt/sources.list
to:
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner
deb-src http://archive.canonical.com/ubuntu focal partner
And run apt update
followed by:
sudo apt download mysql-server-8.0
sudo dpkg -i --force-all ./*.deb
If that also didn't worked then
If the above didn't work then I'll recommend reinstalling Ubuntu.