Would you like to learn how to install MySQL version 5.7 on a computer running Ubuntu 20? In this tutorial, we are going to install MySQL 5.7 on a computer running Ubuntu Linux.

• Ubuntu 20.04
• MySQL 5.7

Equipment list

The following section presents the list of equipment used to create this tutorial.

As an Amazon Associate, I earn from qualifying purchases.

Tutorial MySQL 5.7 - Installation on Ubuntu 20.04

Install the required packages.

Copy to Clipboard

Download and install the MySQL repository package.

Copy to Clipboard

Select the option UBUNTU BIONIC.

MySQL57 installation on Ubuntu 20

On the MySQL Server and Cluster screen, select the option MYSQL-5.7.

MySQL57 on Ubuntu 20

Verify the configuration summary and click on the OK button.

MySQL 57 repository configuration ubuntu20

Update the MySQL packages repository.

Copy to Clipboard

Verify the Ubuntu policy for the MySQL package installation.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

In our example, the system offers the option to install the MySQL version 5.7.32.

Take note of the MySQL version you want to install.

As a test, simulate the installation of the MySQL 5.7 client package.

Copy to Clipboard

If not errors were detected, perform the installation of the MySQL 5.7 client package.

Copy to Clipboard

Optionally, simulate the installation of the remaining MySQL packages.

Copy to Clipboard

Install the MySQL server version 5.7.

Copy to Clipboard

Configure the password to the MySQL account named ROOT.

MySQL 57 Root password

Verify the MySQL version installed.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Access the MySQL service command-line.

Copy to Clipboard

Enter the password of the account named ROOT.

Copy to Clipboard

Congratulations! you have finished the installation of MySQL version 5.7 on Ubuntu Linux 20.04.

Tutorial MySQL 5.7 - Preventing the package upgrade

We need to prevent the upgrade of the MySQL packages.

Verify the MySQL packages version installed.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

Create the required configuration file to prevent the MySQL upgrade.

Copy to Clipboard

Here is the file content.

Copy to Clipboard

Update the Ubuntu packages repository

Copy to Clipboard

Verify the Ubuntu policy for the MySQL package installation.

Copy to Clipboard

Here is the command output.

Copy to Clipboard

As a test, try to install the latest version of the MySQL server package.

Copy to Clipboard

The system will not try to upgrade the MySQL packages installed.

Copy to Clipboard

Congratulations! you have prevented the upgrade of the MySQL version 5.7 on Ubuntu Linux 20.04.