Install MySQL 8.0 on Fedora 28/27/26, CentOS/RHEL 7/6, Ubuntu 20.04/18.04/16.04

Under this tutorial we’ll install MySQL 8.0 on Fedora, Centos/RHEL and Ubuntu server, Mysql 8.0 is highly optimized for security and performance benefits + some more features are added for future scripts. Some new features and new things are listed below :-

  • The database now incorporates a transactional data dictionary.
  • Comes with Atomic DDL statement support.
  • Enhanced security and account management.
  • Improvements to resource management.
  • Several InnoDB enhancements.
  • New type of backup lock.
  • Default character set has changed to utf8mb4 from latin1.
  • A couple of JSON enhancements.
  • Comes with regular expression support using International Components for Unicode (ICU).
  • New error logging which now uses the MySQL component architecture.
  • Enhancements to MySQL replication.
  • Supports common table expressions(both non-recursive and recursive).
  • Has an enhanced optimizer.
  • Additional window functions and more.

MySQL community server is a free open source, popular and cross-platform database management system. It supports both SQL and NoSQL. It also comes with multiple database connectors for different programming languages, allowing you to develop applications using any of the well known languages, and many other features. Mysql have wide variety of language/script support almost all popular script using MySQL database for easy management to scale your business/app.

Fedora

First install MySQL repo :

## Fedora 28 ##
dnf install https://dev.mysql.com/get/mysql80-community-release-fc28-1.noarch.rpm

## Fedora 27 ##
dnf install https://dev.mysql.com/get/mysql80-community-release-fc27-1.noarch.rpm

## Fedora 26 ##
dnf install https://dev.mysql.com/get/mysql80-community-release-fc26-1.noarch.rpm

To install Mysql 8.0 on Fedora 28/27/26 :

dnf install mysql-community-server

then run this command to setup mysql root password :

mysql_secure_installation

CentOS and Red Hat (RHEL)

First install MySQL repo :

## CentOS 7 and Red Hat (RHEL) 7 ##
yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm

## CentOS 6 and Red Hat (RHEL) 6 ##
yum localinstall https://dev.mysql.com/get/mysql80-community-release-el6-1.noarch.rpm

To install Mysql 8.0 CentOS 7.5/6.9 and Red Hat (RHEL) 7.5/6.9

yum install mysql-community-server

then run this command to setup mysql root password :

mysql_secure_installation

Ubuntu

Add MySQL Apt Repository :

wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.15-1_all.deb 
dpkg -i mysql-apt-config_0.8.15-1_all.deb 

Update Ubuntu run this below commands :

apt update

To Install MySQL 8.0 :

To install mysql 8.0 run below commands :

apt-get install mysql-server

then run this command to setup mysql root password :

mysql_secure_installation

To Upgrade to MySQL 8.0 :

to upgrade from previous version of mysql (5.7) run this command :

apt-get install mysql-server

You’ll then asked for on screen configuration :-

Select :-

Which MySQL product do you wish to configure?
> MySQL Server & Cluster (Currently selected: mysql-5.7)

Select mysql-8.0 :

Which server version do you wish to receive?
   mysql-5.7
 > mysql-8.0
   none

Select MySQL Server & Cluster (Currently selected: mysql-8.0) :

Which MySQL product do you wish to configure?
 > MySQL Server & Cluster (Currently selected: mysql-8.0)
   MySQL Tools & Connectors (Currently selected: Enabled)
   MySQL Preview Packages (Currently selected: Disabled)

Select mysql-8.0 :

Which server version do you wish to receive?
   mysql-5.7
 > mysql-8.0

Then select OK and hit enter :

Which MySQL product do you wish to configure?
   MySQL Server & Cluster (Currently selected: mysql-8.0)
   MySQL Tools & Connectors (Currently selected: Enabled)
   MySQL Preview Packages (Currently selected: Disabled)
 > Ok

Now upgrade mysql server to 8.0 :

apt update
apt-get dist-upgrade

Done

Back to top button