In this Video, We are going to Perform How to install MySQL 5.7 on Ubuntu 20.04 LTS using command line.
https://www.fosstechnix.com/how-to-install-mysql-5-7-on-ubuntu-20-04-lts/
Step 1: Add MySQL APT Repository in Ubuntu
Ubuntu comes with default package repositories. So,if we want to add/install latest repositories then we have to add/install package repositories.
Below are commands to add/download latest MySQL APT repository using command line,
$ sudo wget https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
then, below command is to install above downloaded apt repository,
$ sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
Select Ubuntu Bionic option and click on Ok.
By default it shows MySQL 8.0, Click on First option .
Select MySQL 5.7 server and click on OK.
Confirm that showing MySQL 5.7 on First option and Click on OK.
Step 2: Update MySQL Repository
Update apt repository
$ sudo apt-get update
Search MySQL 5.7 package using MySQL apt cache and select 5.7.30-1ubuntu18.04 to install
$ sudo apt-cache policy mysql-server
Now install MySQL client 5.7.30 as output shown above
$ sudo apt install -f mysql-client=5.7.30-1ubuntu18.04
Step 3: How to Install MySQL 5.7 on Ubuntu 20.04 LTS
Install MySQL 5.7 on Ubuntu 20.04 LTS using below command,
$ sudo apt install -f mysql-community-server=5.7.30-1ubuntu18.04
Installation process will prompt default password for root user and again same password.
Install mysql-server=5.7.30 package also
$ sudo apt install -f mysql-server=5.7.30-1ubuntu18.04
Step 4: Secure MySQL Installation
MySQL Server comes with a script mysql_secure_installation this can do multiple security related operations,
Run the below script on command prompt, asks below options.
$ mysql_secure_installation
Step 5: Login to MySQL
Now, Login to MySQL 5.7 Server using below command and use password to login entered during installation.
$ mysql -u root -p
How to Enable MySQL Remote Access in Ubuntu 16.04
By default, In MySQL database server remote access is disabled for security reason.
To enable remote connections of MySQL Server, we have to change bind-address in MySQL configuration file.
Open the /etc/mysql/mysql.conf.d/mysqld.cnf file
sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf
Below the [mysqld] section find the Line,
[mysqld]
bind-address = 127.0.0.1
And replace it to
bind-address = 0.0.0.0
#mysql #ubuntu