Install Percona Mysql8 on Ubuntu 18.04 and 20.04

Install Percona Mysql8 on ubuntu

How to Install Percona server for MySQL8 on Ubuntu 20.04|18.04 / Debian 10/9?. Percona Server for MySQL8 is a free and open source distribution of the MySQL relational database management system created by Percona. It is a fully compatible drop-in replacement for Oracle MySQL. In this guide, we will look at how to install and configure Percona MySQL Server8 on Ubuntu 20.04|18.04 / Debian 10|9

Step 1: Add Percona Repository :

sudo apt update
sudo apt install wget
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb

Then Install the downloaded package with dpkg.

sudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.deb

The command above will add the repository file to /etc/apt/sources.list.d/percona-release.list

Step 2: Install Percona Server for MySQL8 :

Enable the repository:

$ sudo percona-release setup ps80
* Disabling all Percona Repositories
* Enabling the Percona Server 8.0 repository
* Enabling the Percona Tools repository
Get:1 http://repo.mysql.com/apt/ubuntu focal InRelease [12.2 kB]
Get:2 http://repo.percona.com/prel/apt focal InRelease [9779 B]
Get:3 http://repo.percona.com/ps-80/apt focal InRelease [15.8 kB]
Get:4 http://repo.percona.com/tools/apt focal InRelease [15.8 kB]
Get:5 http://repo.mysql.com/apt/ubuntu focal/mysql-8.0 Sources [963 B]
Get:6 http://repo.mysql.com/apt/ubuntu focal/mysql-apt-config amd64 Packages [566 B]
Get:7 http://repo.mysql.com/apt/ubuntu focal/mysql-8.0 amd64 Packages [6026 B]
Get:8 http://repo.mysql.com/apt/ubuntu focal/mysql-tools amd64 Packages [6426 B]
Get:9 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]
Hit:10 http://nova.clouds.archive.ubuntu.com/ubuntu focal InRelease
Get:11 http://repo.percona.com/prel/apt focal/main amd64 Packages [750 B]
Get:12 http://nova.clouds.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
Get:13 http://nova.clouds.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Get:14 http://repo.percona.com/ps-80/apt focal/main Sources [1999 B]
Get:15 http://repo.percona.com/ps-80/apt focal/main amd64 Packages [27.6 kB]
Get:16 http://repo.percona.com/tools/apt focal/main Sources [7579 B]
Get:17 http://repo.percona.com/tools/apt focal/main amd64 Packages [20.2 kB]
Fetched 454 kB in 1s (677 kB/s)
Reading package lists... Done

After enabling the repository, Install Percona Mysql8 on ubuntu

 sudo apt install percona-server-server

Provide root password and set Select default authentication plugin when prompted. Wait for the installation to finish then login to MySQL shell.

$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 10
Server version: 8.0.13-3 Percona Server (GPL), Release '3', Revision 'a920dd6'
Copyright (c) 2009-2018 Percona LLC and/or its affiliates
Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SELECT VERSION();
+-----------+
| VERSION() |
+-----------+
| 8.0.13-3 |
+-----------+
1 row in set (0.00 sec)
mysql> QUIT;

Percona Server for MySQL 5.7 can be installed by running:

$ sudo percona-release setup ps57
* Disabling all Percona Repositories
* Enabling the Percona Server 5.7 repository
* Enabling the Percona XtraBackup 2.4 repository
Hit:1 http://repo.mysql.com/apt/ubuntu focal InRelease
Hit:2 http://repo.percona.com/prel/apt focal InRelease
Get:3 http://repo.percona.com/ps-57/apt focal InRelease [9809 B]
Get:4 http://repo.percona.com/pxb-24/apt focal InRelease [9779 B]
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://nova.clouds.archive.ubuntu.com/ubuntu focal InRelease
Hit:7 http://nova.clouds.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:8 http://nova.clouds.archive.ubuntu.com/ubuntu focal-backports InRelease
Get:9 http://repo.percona.com/ps-57/apt focal/main Sources [2461 B]
Get:10 http://repo.percona.com/ps-57/apt focal/main amd64 Packages [19.6 kB]
Get:11 http://repo.percona.com/pxb-24/apt focal/main Sources [1828 B]
Get:12 http://repo.percona.com/pxb-24/apt focal/main amd64 Packages [2731 B]
Fetched 46.2 kB in 1s (48.7 kB/s)
Reading package lists... Done

$ sudo apt install percona-server-server-5.7

Next Topic : Click Here

Leave a Reply