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.
Related tutorial – MySQL
On this page, we offer quick access to a list of tutorials related to MySQL.
Tutorial MySQL 5.7 – Installation on Ubuntu 20.04
Install the required packages.
Download and install the MySQL repository package.
Select the option UBUNTU BIONIC.
On the MySQL Server and Cluster screen, select the option MYSQL-5.7.
Verify the configuration summary and click on the OK button.
Update the MySQL packages repository.
Verify the Ubuntu policy for the MySQL package installation.
Here is the command output.
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.
If not errors were detected, perform the installation of the MySQL 5.7 client package.
Optionally, simulate the installation of the remaining MySQL packages.
Install the MySQL server version 5.7.
Configure the password to the MySQL account named ROOT.
Verify the MySQL version installed.
Here is the command output.
Access the MySQL service command-line.
Enter the password of the account named ROOT.
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.
Here is the command output.
Create the required configuration file to prevent the MySQL upgrade.
Here is the file content.
Update the Ubuntu packages repository
Verify the Ubuntu policy for the MySQL package installation.
Here is the command output.
As a test, try to install the latest version of the MySQL server package.
The system will not try to upgrade the MySQL packages installed.
Congratulations! you have prevented the upgrade of the MySQL version 5.7 on Ubuntu Linux 20.04.