How to install Percona Database Server on Ubuntu 20.04
Percona Server is a fork of the MySQL server. It is fully compatible and a replacement for Oracle MySQL. Percona Server is used by thousands of enterprises to provide superior performance, scalability, and instrumentation for their workloads. It is compatible with many cloud providers including, AWS, Google Cloud, Azure, and more. It is capable to scales over 48 CPU cores and achieves hundreds of thousands of I/O operations per second.
In this tutorial, we will show you how to install Percona Server on Ubuntu 20.04.
- A server running Ubuntu 20.04.
- A root password is configured on your server.
Before starting, you will need to update your system packages to the latest version. You can update all of them with the following command:
apt-get update -y
Once all the packages are updated, install other required dependencies with the following command:
apt-get install wget unzip gnupg2 -y
Once all the dependencies are installed, you can proceed to the next step.
Add Percona Repository
By default, Percona is not included in the Ubuntu default repository. So you will need to add the Percona repository to your system.
First, download the Percona release deb file with the following command:
wget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.deb
Once the download is completed, install the downloaded file with the following command:
dpkg -i percona-release_latest.focal_all.deb
You should get the following output:
Selecting previously unselected package percona-release. (Reading database ... 87734 files and directories currently installed.) Preparing to unpack percona-release_latest.focal_all.deb ... Unpacking percona-release (1.0-25.generic) ... Setting up percona-release (1.0-25.generic) ... * Enabling the Percona Original repository <*> All done! ==> Please run "apt-get update" to apply changes * Enabling the Percona Release repository <*> All done! ==> Please run "apt-get update" to apply changes The percona-release package now contains a percona-release script that can enable additional repositories for our newer products. For example, to enable the Percona Server 8.0 repository use: percona-release setup ps80 Note: To avoid conflicts with older product versions, the percona-release setup command may disable our original repository for some products. For more information, please visit: https://www.percona.com/doc/percona-repo-config/percona-release.html
Install Percona Server
Percona repository provides many tools. In this section, we will install Percona 8. You can install it with the following command:
percona-release setup ps80
apt-get install percona-server-server
During the installation, you will be asked to set a root password as shown below:
Set a root password and hit Enter. You will be asked to choose the authentication plugin as shown below:
Select the first option and hit Enter to install the Percona server.
Congratulations! you have successfully installed the Percona server on Ubuntu 20.04. You can now use Percona in your projects with extra functionality.