I'm using Ubuntu 16.04. Currently, I have MySQL 5.7.31. I need to install MySQL 8 on my laptop. I tried installing that in Ubuntu 16.04.
$ wget https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
--2020-10-29 13:41:01-- https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb
Resolving dev.mysql.com (dev.mysql.com)... 137.254.60.11
Connecting to dev.mysql.com (dev.mysql.com)|137.254.60.11|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://repo.mysql.com//mysql-apt-config_0.8.15-1_all.deb [following]
--2020-10-29 13:41:09-- https://repo.mysql.com//mysql-apt-config_0.8.15-1_all.deb
Resolving repo.mysql.com (repo.mysql.com)... 49.44.146.86
Connecting to repo.mysql.com (repo.mysql.com)|49.44.146.86|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 35532 (35K) [application/x-debian-package]
Saving to: ‘mysql-apt-config_0.8.15-1_all.deb’
mysql-apt-config_0. 100%[===================>] 34.70K --.-KB/s in 0.08s
2020-10-29 13:41:13 (453 KB/s) - ‘mysql-apt-config_0.8.15-1_all.deb’ saved [35532/35532]
$ sudo dpkg -i mysql-apt-config_0.8.15-1_all.deb
sudo: unable to resolve host sanmitha-sadhishkumar
(Reading database ... 208892 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.15-1_all.deb ...
Unpacking mysql-apt-config (0.8.15-1) over (0.8.10-1) ...
Setting up mysql-apt-config (0.8.15-1) ...
OK
~$ sudo apt update
Get:1 http://repo.mysql.com/apt/ubuntu xenial InRelease [21.6 kB]
Hit:2 http://linux.teamviewer.com/deb stable InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu xenial InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:6 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:7 http://ppa.launchpad.net/deadsnakes/ppa/ubuntu xenial InRelease
Fetched 21.6 kB in 4s (4,912 B/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
393 packages can be upgraded. Run 'apt list --upgradable' to see them.
~$ sudo apt install mysql-server
sudo: unable to resolve host sanmitha-sadhishkumar
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.7.32-1ubuntu16.04).
The following packages were automatically installed and are no longer required:
gksu libgksu2-0 pencil2d snapd-login-service
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 393 not upgraded.
I'm not getting MySQL 8.0 instead 5.7.31 gets retained. What to do next so that I get 8.0 version of MySQL?
sudo apt policy mysql-server
to see the package versions of the different repos. – Artur Meinild Oct 29 '20 at 13:17