How to install MySQL 5.7 on Ubuntu 20.04
This article explains the steps to install MySQL 5.7 on Ubuntu 20.04.
Step1: Login to the server as root.
Step2: Download the APT repo config for MySQL.
#wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
Step3: Add MySQL APT repository in Ubuntu
#dpkg -i mysql-apt-config_0.8.12-1_all.deb
In the prompt, choose Ubuntu Bionic and click Ok.
The next prompt shows MySQL 8.0 chosen by default. Choose the first option and click OK.
In the next prompt, select MySQL 5.7 server and click OK.
The next prompt selects MySQL5.7 by default. Choose the last otpion Ok and click OK.
Step4: Update MySQL Repository on Ubuntu.
#apt-get update
Step5: Install MySQL 5.7
#apt install -f mysql-client=5.7* mysql-community-server=5.7* mysql-server=5.7*
Step6: Secure MySQL 5.7 Installation.
#mysql_secure_installation
Follow the instructions on stdout and complete the installation.
That's all…