Steps to Install MySQL 8.0 on Ubuntu 20.04

<imgsrc=”https://www.ubuntu-server.com/wp-content/uploads/2021/06/my-sql-on-ubuntu-4.jpg” alt=”my-sql-on-ubuntu-4″ class=”wp-image-19903″ width=”768″ height=”512″ srcset=”https://www.ubuntu-server.com/wp-content/uploads/2021/06/my-sql-on-ubuntu-4.jpg 640w, https://actsupport.com/wp-content/uploads/2021/03/my-sql-on-ubuntu-4-300×200.jpg 300w, https://actsupport.com/wp-content/uploads/2021/03/my-sql-on-ubuntu-4-600×400.jpg 600w” sizes=”(max-width: 768px) 100vw, 768px”>
Steps to install mysql 8. 0 on ubuntu 20. 04 1

MySQL is the most popular used Open source Database Management System. Some of the new factors of MySQL 8.0 are Atomic Data Definition Statement Support, Enhanced Security and account management, and Support different types of indexes and Query Optimization.
Let’s start the installation of MySQL on Ubuntu by using the steps given below.

Step 1: Install MySQL APT in Ubuntu 20.04

Ubuntu comes with default MySQL repositories during installation and any specific version of MySQL will require you to install the specific package repositories. MySQL is now available in both the Ubuntu repository and MySQL Dev repository.

You can download and install the latest repositories on your Ubuntu 18.04 system by using the below command.

wget mysql.com/get/mysql-apt-config_0.8.12-1_all.deb" target="_blank">

https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb

 .

Once downloaded, run the command to install the packages:

sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb

Step 2: Update MySQL Repository on Ubuntu

Now, you can execute the following command to update MySQL8 on Ubuntu.

Sudo apt update

Finally, install the server packages.

Sudo apt install mysql-server

Step 3: Add MySQL 8 on Ubuntu 20.04

We need to install MySQL 8.0 server by running the following command,

sudo apt install -f mysql-client=8.0.21-1ubuntu18.04 mysql-community-server=8.0.21-1ubuntu18.04 mysql-server=8.0.21-1ubuntu18.04

Next, initiate the installation process by clicking the Y key, and then set a root password for your MySQL database.

Step 4: Secure MySQL Installation

Execute the command to secure your MySQL installation

sudo mysql_secure_installation and press

ENTER

.

Check MySQL Version

Check MySQL version installed to connect with MySQL, and then execute the below command:

Sudo mysql -u root -p

Enter the above-created root password. Once it connected, run the command to display the MySQL version.

mysql> SELECT VERSION();

MySQL 8.0 uses a new authentication based on improved SHA 256 password methods. Due to the new authentication mechanism, old clients built with libmysqlclient may not be able to connect to the database server. You can change the default authentication plugin any time by setting the below in the configuration /etc/mysql/my.cnf file.

 

Ubuntu Server Admin

Recent Posts

Advantech AOM-2721 is now Ubuntu Certified

Canonical announces that the Advantech AOM-2721 is officially joining the list of Ubuntu Certified Hardware.…

5 hours ago

Ruby and Rails Performance Roundup: The Backlog Edition

Yet again instead of tweets, a blog post. The backlog got out of hand -…

5 hours ago

How to Deploy OpenProject on Ubuntu VPS

This article provides a guide demonstrating how to deploy OpenProject on Ubuntu VPS. What is…

5 hours ago

Canonical integrates NVIDIA Nemotron 3.5 Lightning with Ubuntu for always-on AI agents

Canonical is pleased to announce that  NVIDIA’s newly introduced NVIDIA Nemotron 3.5 Lightning, an open,…

2 days ago

Xfwl4’s Second Preview Release

I’m pleased to announce the second preview release of xfwl4, Xfce’s Wayland compositor, version 4.21.1.…

2 days ago

How to Install, Secure, and Set Up MySQL on Ubuntu 26.04 LTS

If you have been using an ecommerce store to place online orders or have been…

3 days ago