Unable to install mysqldiff on ubuntu 20.04

Since I've upgraded my system to 20.04 mysqldiff is missing. I found this package: https://manpages.ubuntu.com/manpages/focal/en/man1/mysqldiff.1.html but if I try to install it with apt, but it can't find it.

sudo apt install mysql-utilities

Neither its dependency found by apt: python-mysql.connector (>= 1.2.1) https://launchpad.net/ubuntu/focal/amd64/mysql-utilities/1.6.4-1

When I try to search mysql-utilities, it says:

$ apt-cache search mysql-utilities
libmysql-diff-perl - module for comparing the table structure of two MySQL databases

I also tried to install libmysql-diff-perl (just like before probably) but no mysqldiff command available.

Anyone faced with the same issue?


This package is not available for 20.04 LTS because of Python 2 deprecation, but you can still install it using packages from 19.10:

mkdir -p ~/Downloads/mysqldiff
cd ~/Downloads/mysqldiff
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/python-nacl/python-nacl_1.3.0-2_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/pyodbc/python-pyodbc_4.0.22-1build2_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/paramiko/python-paramiko_2.6.0-1_all.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/a/antlr4-cpp-runtime/libantlr4-runtime4.7.2_4.7.2+dfsg-1_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/main/p/poppler/libpoppler90_0.80.0-0ubuntu1_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/n/netcdf/libnetcdf13_4.6.2-1build1_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/p/proj/libproj13_5.2.0-1_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/libg/libgeotiff-dfsg/libgeotiff2_1.4.3-1_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gdal/gdal-data_2.4.2+dfsg-1build2_all.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/g/gdal/libgdal20_2.4.2+dfsg-1build2_amd64.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/m/mysql-connector-python/python-mysql.connector_8.0.15-1_all.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/m/mysql-workbench/mysql-workbench-data_8.0.17+dfsg-1ubuntu2_all.deb
wget http://old-releases.ubuntu.com/ubuntu/pool/universe/m/mysql-workbench/mysql-workbench_8.0.17+dfsg-1ubuntu2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/m/mysql-utilities/mysql-utilities_1.6.4-1_all.deb
sudo apt-get update
sudo apt-get install ./*.deb

then pin libgdal packages with to prevent removal of just installed packages:

cat <<EOF | sudo tee /etc/apt/preferences.d/pin-gdal
Package: gdal-data
Pin: version 2.4.2+dfsg-1build2
Pin-Priority: 1337

Package: libgdal20
Pin: version 2.4.2+dfsg-1build2
Pin-Priority: 1337
EOF

and enjoy:

$ mysqldiff --version
MySQL Utilities mysqldiff version 1.6.4 
License type: GPLv2

Also you will get mysql-workbench installed as dependency and as free bonus :)