How To Install mysql-server-8.0 on Ubuntu 20.04

In this tutorial we learn how to install mysql-server-8.0 on Ubuntu 20.04. mysql-server-8.0 is MySQL database server binaries and system database setup MySQL database server binaries and system database setup

Introduction

In this tutorial we learn how to install mysql-server-8.0 on Ubuntu 20.04.

What is mysql-server-8.0

mysql-server-8.0 is:

MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query language in the world. The main goals of MySQL are speed, robustness and ease of use.

This package contains all the infrastructure needed to setup system databases. Task: lamp-server

Package: mysql-server-8.0 Architecture: amd64 Version: 8.0.19-0ubuntu5 Priority: optional Section: database Source: mysql-8.0 Origin: Ubuntu Maintainer: Ubuntu Developers [email protected] Original-Maintainer: Debian MySQL Maintainers [email protected] Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 1385 Provides: virtual-mysql-server Pre-Depends: adduser (>= 3.40), debconf, mysql-common (>= 5.5) Depends: lsb-base (>= 3.0-10), mysql-client-8.0 (>= 8.0.19-0ubuntu5), mysql-common (>= 5.8+1.0.4~), mysql-server-core-8.0 (= 8.0.19-0ubuntu5), passwd, perl:any (>= 5.6), psmisc, debconf (>= 0.5) | debconf-2.0 Recommends: libhtml-template-perl, mecab-ipadic-utf8 Suggests: mailx, tinyca Conflicts: mariadb-server-10.1, mariadb-server-10.3, mysql-server-5.7, virtual-mysql-server Filename: pool/main/m/mysql-8.0/mysql-server-8.0_8.0.19-0ubuntu5_amd64.deb Size: 1214960 MD5sum: 880d495c1a5d98c9642843234abe4a7f SHA1: f7568137f4a65d95ed5caacc79a8eec1ac6d4e8e SHA256: 454284c99564ea629af8e6c43aaced7169ce5e9564f0cf122680e2ccb63a0428 Homepage: http://dev.mysql.com/ Description-en: MySQL database server binaries and system database setup MySQL is a fast, stable and true multi-user, multi-threaded SQL database server. SQL (Structured Query Language) is the most popular database query language in the world. The main goals of MySQL are speed, robustness and ease of use.

This package contains all the infrastructure needed to setup system databases. Task: lamp-server

There are three methods to install mysql-server-8.0 on Ubuntu 20.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install mysql-server-8.0 Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install mysql-server-8.0 using apt-get by running the following command:

sudo apt-get -y install mysql-server-8.0

Install mysql-server-8.0 Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install mysql-server-8.0 using apt by running the following command:

sudo apt -y install mysql-server-8.0

Install mysql-server-8.0 Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install mysql-server-8.0 using aptitude by running the following command:

sudo aptitude -y install mysql-server-8.0

How To Uninstall mysql-server-8.0 on Ubuntu 20.04

To uninstall only the mysql-server-8.0 package we can use the following command:

sudo apt-get remove mysql-server-8.0

Uninstall mysql-server-8.0 And Its Dependencies

To uninstall mysql-server-8.0 and its dependencies that are no longer needed by Ubuntu 20.04, we can use the command below:

sudo apt-get -y autoremove mysql-server-8.0

Remove mysql-server-8.0 Configurations and Data

To remove mysql-server-8.0 configuration and data from Ubuntu 20.04 we can use the following command:

sudo apt-get -y purge mysql-server-8.0

Remove mysql-server-8.0 configuration, data, and all of its dependencies

We can use the following command to remove mysql-server-8.0 configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge mysql-server-8.0

References

Summary

In this tutorial we learn how to install mysql-server-8.0 package on Ubuntu 20.04 using different package management tools: apt, apt-get and aptitude.