I have some trouble installing mysql-server 5.7 on ubuntu 19.10 (eoan) machine. Unfortunately I'm bound to mysql-server version 5.6/5.7 so just installing mysql-server 8.0 is no option.
According to earlier attempts on earlier ubuntu versions I added the mysql repository for mysql-server 5.7. This results in:
/etc/apt/sources.list.d/mysql.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ### # You may comment out entries below, but any other modifications may be lost. # Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications. deb bionic mysql-apt-config deb bionic mysql-5.7 deb bionic mysql-tools # deb bionic mysql-tools-preview deb-src bionic mysql-5.7 After doing this I run the command(s) below.
sudo apt update .... Hit:1 bionic InRelease .... after updating all the repos on my machine I run the command to install the mysql-server 5.7.
sudo apt install mysql-server ..... The following additional packages will be installed: mysql-client-8.0 mysql-client-core-8.0 mysql-server-8.0 mysql-server-core-8.0 As you can see from the output above ubuntu is still trying to install the mysql-server 8.0 version. This is NOT what I need.
I also tried to install mysql-server 5.7 manually by downloading the .deb files but this resulted in an dependency chaos which where unable to install.
Below I listed the content of /etc/apt/sources.list, I installed Ubuntu 19.10 by doing a serie of dist-upgrades commands. (as you can see from the lines that are commented out.)
TL;DR
I am unable to install mysql-server 5.7 at a ubuntu 19.10 machine (installed 19.10 by doing a serie of dist upgrade commands.). I added mysql 5.7 repo and ran the update command, still no luck. Ubuntu still tries to install mysql-server 8.0.
Does anybody have a suggestion to prevent mysql-server 8.0 from being installed and install mysql 5.7 instead (I am required to install mysql 5.6/5.7 I cannot use mysql-server 8.0)
# See for how to upgrade to # newer versions of the distribution. deb eoan main restricted # deb-src artful main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb eoan-updates main restricted # deb-src artful-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb eoan universe # deb-src artful universe deb eoan-updates universe # deb-src artful-updates universe ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team, and may not be under a free licence. Please satisfy yourself as to ## your rights to use the software. Also, please note that software in ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team. deb eoan multiverse # deb-src artful multiverse deb eoan-updates multiverse # deb-src artful-updates multiverse ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb eoan-backports main restricted universe multiverse # deb-src artful-backports main restricted universe multiverse ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. # deb artful partner # deb-src artful partner deb eoan-security main restricted # deb-src artful-security main restricted deb eoan-security universe # deb-src artful-security universe deb eoan-security multiverse # deb-src artful-security multiverse 11 Answer
I found the following solution to install mysql-server 5.7 on ubuntu 19.10.
configure apt to include the mysql repository for mysql 5.7, see: mysql-apt-config_0.8.12-1_all.deb, you can follow the same instructions found here: MySQL APT repository configuration, make sure when running
mysql-apt-config-0.8.12-1_all.debyou select the MySQL 5.7 version.Make sure to run
sudo apt update. after running this command run the command:sudo apt policy mysql-server.
The output should look very similar to the output listed below:
Installed: None Candidate: 8.0.17-0ubuntu2 Version table: 8.0.17-0ubuntu2 500 500 eoan/main amd64 Packages 500 eoan/main i386 Packages 5.7.28-1ubuntu18.04 500 500 bionic/mysql-5.7 amd64 Packages 100 /var/lib/dpkg/status The output below is now listing two versions of the mysql-server package. The default candidate version for ubuntu 19.10 is mysql-server 8.0.17-0ubuntu2.
The second package is the package from the newly added repository above. for me, this is mysql-server 5.7.28-1ubuntu18.04
- To install another version of the mysql-server package (other than the default candidate) I run the following command:
sudo apt install mysql-server=<version-tag>
Example:
sudo apt install mysql-server=5.7.28-1ubuntu18.04
First, this raised a dependency issue for the package mysql-client, but I fixed this by following the same instructions from step 2 for the mysql-client package.