2

Official repo for MySQL8 https://repo.mysql.com/apt/ not working. How to add archive.ubuntu.com/ubuntu/pool/main/m/mysql-8.0/ to source list for Ubuntu 18.04 Bionic for setup MySQL8?

I'm trying to add next list to /etc/apt/sources.list.d/mysql.list

deb http://ua.archive.ubuntu.com/ubuntu/pool/main  bionic main
deb-src http://ua.archive.ubuntu.com/ubuntu/pool/main bionic main

but it's not working

Kulfy
  • 17,696

1 Answers1

0

The first method:

wget https://repo.mysql.com/mysql-apt-config_0.8.9-1_all.deb
sudo dpkg -i mysql-apt-config_0.8.9-1_all.deb

Text window will appear:

  • Select Xenial as most recent and hit Enter
  • Select MySQL Server & Cluster (Currently selected: mysql-5.7) and hit Enter
  • Select mysql-8.0 preview and hit Enter
  • Select OK and press

But you could get the following errors during sudo apt update:

Err:3 http://repo.mysql.com/apt/ubuntu xenial InRelease
  The following signatures were invalid: EXPKEYSIG 8C718D3B5072E1F5 MySQL Release Engineering <mysql-build@oss.oracle.com>
Reading package lists... Done               
W: GPG error: http://repo.mysql.com/apt/ubuntu xenial InRelease: The following signatures were invalid: EXPKEYSIG 8C718D3B5072E1F5 MySQL Release Engineering <mysql-build@oss.oracle.com>
E: The repository 'http://repo.mysql.com/apt/ubuntu xenial InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

To get rid of those errors, remove newly added repository file:

sudo rm /etc/apt/sources.list.d/mysql.list

So try the second method.

The second method if the first did not go:

Your /etc/apt/sources.list should look like this for that:

deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse

If your server is used for learning and testing purposes, OS dependencies issues and system breaking are accessible, then you could try to add the next to your sources.list:

deb http://ru.archive.ubuntu.com/ubuntu/ eoan main restricted

Then sudo apt update && sudo apt install mysql-server-8.0

During mysql-server-8.0 package installation copy installed packages information somewhere to have the ability to remove them and install supported versions instead after eoan's repository commenting. It could remove other packages, required for stable system processing. So be prepared to recover or reinstall your system.

After mysql-server installation

  • Comment out eoan repository record
  • sudo apt clean && sudo apt update

To roll back to normal configuration:

  • sudo apt purge mysql-server-8.0 && sudo apt autoremove
  • Comment or remove eoan record in sources.list
  • sudo apt update && sudo apt install -f && sudo apt upgrade
Gryu
  • 7,559
  • 9
  • 33
  • 52