Search code examples
mysqlubuntuaptapt-get

How to install specific of MySQL using apt package manager


I want to install a specific version of MySQL on my Ubuntu machine. Is there a way to install it using the package manager 'apt' or 'apt-get'?

In a normal installation, I'm getting MySQL 5.6 and when I try with MySQL documentation for MySQL 8, it installs version 8.0.25.

I looked into installing specific version of a package using 'package=version' in ubuntu with this Link

But, is that possible in the case of MySQL. If possible, where can I get the available version list? I want to install MySQL version 8.0.21.


Solution

  • To install a specific version, we have to use Archives

    Download version 8.0.21 based on your system architecture from the archives

    To unpack it, use this command with root access

    tar -xvf mysql-server_MVER-DVER_CPU.deb-bundle.tar

    You may need to install the libaio library if it is not already present on your system:

    sudo apt-get install libaio1

    For a basic installation of the MySQL server, install the database common files package, the client package, the client metapackage, the server package, and the server metapackage (in that order); you can do that with a single command:

    sudo dpkg -i mysql-{common,community-client,client,community-server,server}_*.deb

    For more details regarding installing and setup visit : MySQL installation guide