Can anyone help me in installing mysql 5.7. I tried following this answer, but when I run
sudo apt-cache policy mysql-server
It gives me:
8.0.20-0ubuntu0.20.04.1 500
500 http://pk.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://pk.archive.ubuntu.com/ubuntu focal-updates/main i386 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu focal-security/main i386 Packages
8.0.19-0ubuntu5 500
500 http://pk.archive.ubuntu.com/ubuntu focal/main amd64 Packages
500 http://pk.archive.ubuntu.com/ubuntu focal/main i386 Packages
5.7.31-1ubuntu18.04 500
500 http://repo.mysql.com/apt/ubuntu bionic/mysql-5.7 amd64 Packages
5.7.30-0ubuntu0.18.04.1 500
500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages
Which are different from the linked answer.
When I tried to
sudo apt install -f mysql-client=5.7.30-1ubuntu18.04
It gives me error
Version '5.7.30-1ubuntu18.04' for 'mysql-client' was not found.
When I run sudo apt install -f mysql-client-5.7
command it installed mysql version.
I also does not finds mysql-community-server=5.7.30-1ubuntu18.04
.
I tried to run sudo apt install -f mysql-community-server
It gives me following error:
mysql-community-server : Depends: mysql-client (= 5.7.31-1ubuntu18.04) but 8.0.20-0ubuntu0.20.04.1 is to be installed
sudo dpkg -i mysql-community-server_5.7.31-1ubuntu18.04_i386.deb
mysql-community-server:i386 : Depends: perl:i386 but it is not installed – Maaz Anzar Jul 21 '20 at 09:28DEB Bundle
package on that link. Then, I extracted the tarball into its own folder. Once inside the folder, I ransudo dpkg -i *.deb
. Halfway through the installation process, it failed onmysql-community-client
. Apparently certain dependencies were unmet. In order to fix this, I had to runsudo apt-get install --fix-broken
. Then, I was able to re-runsudo dpkg -i *.deb
and it finished successfully. The Oracle docs were also useful to me: https://docs.oracle.com/cd/E17952_01/mysql-5.6-en/linux-installation-debian.html – GDP2 Feb 01 '22 at 07:18