Ubuntu: install mysql specific version



Question:

I have installed MySQL using below command in ubuntu 14.04

apt-get install mysql-server  

now checked the version, it automatically install the latest version

mysql --version  

display

mysql Ver 14.14 Distrib 5.7.18, for Linux (x86_64) using EditLine wrapper

But I need to install exact version of MySQL 5.7.17 so tried to run

 apt-get install mysql-client-5.7.17 mysql-client-core-5.7.17  

but it gives the error as below

Reading state information... Done    E: Unable to locate package-client-5.7.17    E: Couldn't find any package by regex-client-5.7.17'    E: Unable to locate package mysql-client-core-5.7.17    E: Couldn't find any package by regex 'mysql-client-core-5.7.17'  

How can I do this and do I need to install both mysql-client and mysql-server separately?

EDIT

Also tried to download specific version using wget

wget https://dev.mysql.com/downloads/gpg/?file=mysql-community-source_5.7.17-1ubuntu14.04_i386.deb

but it's not downloaded; see the terminal output

--2017-06-05 11:19:29--  https://dev.mysql.com/downloads/gpg/?file=mysql-community-source_5.7.17-1ubuntu14.04_i386.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... 200 OK  Length: unspecified [text/html]  Saving to: ‘index.html?file=mysql-community-source_5.7.17-1ubuntu14.04_i386.deb.1’        [   <=>                                                                                   ] 16,416      28.3KB/s   in 0.6s       2017-06-05 11:19:31 (28.3 KB/s) - ‘index.html?file=mysql-community-source_5.7.17-1ubuntu14.04_i386.deb.1’ saved [16416]  


Solution:1

Here how I solved this

  1. Remove all MySQL instances from system

    sudo -i    service mysql stop  #or mysqld   killall -9 mysql    #or mysqld  apt-get remove --purge mysql-client    apt-get remove --purge mysql-server    apt-get remove --purge mysql-common      # delete log and configuration files   rm -rf /var/lib/mysql    rm -rf /var/log/mysql  rm -rf /etc/mysql  
  2. Now download below .deb files from the MySQL archive

    â"œâ"€â"€ mysql-client_5.7.17-1ubuntu14.04_amd64.deb
    â"œâ"€â"€ mysql-common_5.7.17-1ubuntu14.04_amd64.deb
    â"œâ"€â"€ mysql-community-client_5.7.17-1ubuntu14.04_amd64.deb
    â"œâ"€â"€ mysql-community-server_5.7.17-1ubuntu14.04_amd64.deb
    â"œâ"€â"€ mysql-server_5.7.17-1ubuntu14.04_amd64.deb
    â"œâ"€â"€ mysql-server_5.7.17-1ubuntu14.04_amd64.deb-bundle.tar
    â""â"€â"€ mysql-testsuite_5.7.17-1ubuntu14.04_amd64.deb

  3. Install them in the below order

    dpkg -i mysql-common_5.7.9-1ubuntu14.04_amd64.deb    dpkg -i mysql-community-client_5.7.9-1ubuntu14.04_amd64.deb    dpkg -i mysql-client_5.7.9-1ubuntu14.04_amd64.deb    dpkg -i mysql-community-server_5.7.9-1ubuntu14.04_amd64.deb    dpkg -i mysql-server_5.7.9-1ubuntu14.04_amd64.deb    

Note: install libmecab2 if any error comes while installing above package

sudo apt-get install libmecab2  

this will prompt to set root password for mysql; set as you wish

now check

mysql-version

mysql Ver 14.14 Distrib 5.7.17, for Linux (x86_64) using EditLine wrapper

Reference links

  1. https://bugs.mysql.com/bug.php?id=78936
  2. http://installion.co.uk/ubuntu/trusty/universe/l/libmecab2/install/index.html
  3. https://dev.mysql.com/doc/refman/5.6/en/linux-installation-debian.html

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »