im using ubuntu 16 and need mysql-server lower than 5.7.28 i try this steps:
root@hr:~# apt-cache policy mysql-server-5.7
mysql-server-5.7:
Installed: (none)
Candidate: 5.7.28-0ubuntu0.16.04.2
Version table:
5.7.28-0ubuntu0.16.04.2 500
500 http://il.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
5.7.11-0ubuntu6 500
500 http://il.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
so i want to install the 5.7.11-0ubuntu6 package
root@hr:~# apt install mysql-server=5.7.11-0ubuntu6 -V
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
mysql-client-5.7 (5.7.28-0ubuntu0.16.04.2)
mysql-client-core-5.7 (5.7.28-0ubuntu0.16.04.2)
mysql-common (5.7.28-0ubuntu0.16.04.2)
mysql-server-5.7 (5.7.28-0ubuntu0.16.04.2)
mysql-server-core-5.7 (5.7.28-0ubuntu0.16.04.2)
Suggested packages:
mailx
tinyca (0.7.5-6)
The following NEW packages will be installed:
mysql-client-5.7 (5.7.28-0ubuntu0.16.04.2)
mysql-client-core-5.7 (5.7.28-0ubuntu0.16.04.2)
mysql-common (5.7.28-0ubuntu0.16.04.2)
mysql-server (5.7.11-0ubuntu6)
mysql-server-5.7 (5.7.28-0ubuntu0.16.04.2)
mysql-server-core-5.7 (5.7.28-0ubuntu0.16.04.2)
0 upgraded, 6 newly installed, 0 to remove and 151 not upgraded.
Need to get 17.6 MB of archives.
After this operation, 155 MB of additional disk space will be used.
Do you want to continue? [Y/n]
if i click yes it will install al this packages after apt finishing installing the packages i check mysql -V but and getting
mysql Ver 14.14 Distrib 5.7.28, for Linux (x86_64) using EditLine wrapper
what am i doing wrong ? how can i install the desired version ?
as @BanAnanas suggested i added the /etc/apt/preferences file with this lines:
Package: mysql-server-5.7
Pin: version 5.7.11-0ubuntu6
Pin-Priority: 1001
++++++++++++++++++++++++++++++++++++++++++++++++++++
root@hr:~# sudo apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Hit:2 http://il.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://il.archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://il.archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Fetched 325 kB in 8s (38.8 kB/s)
Reading package lists... Done
root@hr:~# sudo apt-get install mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-server-5.7 : Depends: mysql-server-core-5.7 (= 5.7.11-0ubuntu6) but 5.7.28-0ubuntu0.16.04.2 is to be installed
E: Unable to correct problems, you have held broken packages.
root@hr:~# sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libaio1 libcgi-fast-perl libcgi-pm-perl libencode-locale-perl libevent-core-2.0-5 libfcgi-perl libhtml-parser-perl libhtml-tagset-perl libhtml-template-perl libhttp-date-perl
libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libtimedate-perl liburi-perl
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 151 not upgraded.
root@hr:~# sudo apt-get install mysql-server-5.7
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-server-5.7 : Depends: mysql-server-core-5.7 (= 5.7.11-0ubuntu6) but 5.7.28-0ubuntu0.16.04.2 is to be installed
E: Unable to correct problems, you have held broken packages.
root@hr:~# apt-cache policy mysql-server-5.7
mysql-server-5.7:
Installed: (none)
Candidate: 5.7.11-0ubuntu6
Version table:
5.7.28-0ubuntu0.16.04.2 500
500 http://il.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages
5.7.11-0ubuntu6 1001
500 http://il.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
can i use synaptic on ubuntu server ?
synaptic
...but it can turn into a minefield of dependency issues.