How to Install Percona on Ubuntu 18.04 Bionic Beaver

Install Percona on Ubuntu 18.04

In this article, we will have explained the necessary steps to install and configure Percona on Ubuntu 18.04 LTS. Before continuing with this tutorial, make sure you are logged in as a user with sudo privileges. All the commands in this tutorial should be run as a non-root user.

Percona Server for MySQL is a fork of the MySQL relational database management system created by Percona. It is a free open source replacement for MySQL community database server with enterprise features, stability and support.

Install Percona on Ubuntu

Step 1. First, before you start installing any package on your Ubuntu server, we always recommend making sure that all system packages are updated.

sudo apt update
sudo apt upgrade

Step 2. Install Percona.

First, add the official Percona Apt repo here:

wget$(lsb_release -sc)_all.deb

Once the repository file is downloaded, install it with the dpkg command:

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

You should get a message below when done:

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.

Next, Install Percona for MySQL:

sudo percona-release setup ps80
sudo apt update
sudo apt install percona-server-server

Step 3. Securing Percona.

After installation, we have to improve Percona security by typing following:

sudo mysql_secure_installation

Then enter yes/y to the following security questions:

    Remove anonymous users? (Press y|Y for Yes, any other key for No) : y
    Disallow root login remotely? (Press y|Y for Yes, any other key for No) : y
    Remove test database and access to it? (Press y|Y for Yes, any other key for No) : y
    Reload privilege tables now? (Press y|Y for Yes, any other key for No) : y

To connect to the Percona server through the terminal we can use the Percona client. To log in to the Percona server as the root user type:

mysql -u root -p

Step 4. Install Percona Toolkit on Ubuntu.

Finally, update your local apt cache and install Percona Toolkit:

sudo apt update
sudo apt-get install percona-toolkit

That’s all you need to do to install Percona on Ubuntu 18.04 Bionic Beaver. I hope you find this quick tip helpful. If you have questions or suggestions, feel free to leave a comment below.