-1

I have installed Ubuntu 18.04.

I want to install mysql server version 5.6, but apt-get shows that version 5.7 will be installed:

apt-get install mysql-server
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libedit2 libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libgdbm-compat4 libgdbm5 libhtml-parser-perl
  libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libnuma1 libperl5.26
  libtimedate-perl liburi-perl libwrap0 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7 netbase perl
  perl-modules-5.26 psmisc
Suggested packages:
  gdbm-l10n libdata-dump-perl libipc-sharedcache-perl libwww-perl mailx tinyca perl-doc libterm-readline-gnu-perl | libterm-readline-perl-perl make
The following NEW packages will be installed:
  libaio1 libcgi-fast-perl libcgi-pm-perl libedit2 libencode-locale-perl libevent-core-2.1-6 libfcgi-perl libgdbm-compat4 libgdbm5 libhtml-parser-perl
  libhtml-tagset-perl libhtml-template-perl libhttp-date-perl libhttp-message-perl libio-html-perl liblwp-mediatypes-perl libnuma1 libperl5.26
  libtimedate-perl liburi-perl libwrap0 mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server mysql-server-5.7 mysql-server-core-5.7 netbase
  perl perl-modules-5.26 psmisc
0 upgraded, 31 newly installed, 0 to remove and 7 not upgraded.
Need to get 27.8 MB of archives.
After this operation, 204 MB of additional disk space will be used.

How can I force the installation of mysql version 5.6?

Patrick Mevzek
  • 9,921
  • 7
  • 32
  • 43

2 Answers2

0

The command is

sudo apt-get install mysql....5.6

check for the exact command in internet and issue it in command line.

If you a GUI, use software manager to search and install softwares you need.

I think you need to install MariaDB as it is officially supported by some Linux Distros. In these distro's you won't be able to find MySql in their supported software list.

kris123456
  • 101
  • 2
  • if you do this on a vanilla 18.04 installation, you will get `E: Package 'mysql-server-5.6' has no installation candidate`. Some changes to the repository configuration are needed. – Bruce Becker Jun 30 '19 at 09:04
  • I am getting this error .Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package mysql....5.6 E: Couldn't find any package by glob 'mysql....5.6' E: Couldn't find any package by regex 'mysql....5.6' – Sitesh Ranjan Jun 30 '19 at 09:07
  • try to locate mysql 5.6 version in internet. download it and then install manually – kris123456 Jun 30 '19 at 09:27
0

you could try running mysql 5.6 in a docker container, like:

sudo docker run -d --name=mysql56 -e MYSQL_ROOT_PASSWORD='12345' -p 3356:3306  mysql:5.6

and to check with the client:

echo "SELECT VERSION()" | mysql -hlocalhost -uroot -p12345 -P3356 --protocol=tcp

prints:

VERSION()
5.6.44
qwertz
  • 121
  • 4