Installing Percona Distribution for MySQL

Percona Distribution for MySQL packages are available in DEB and RPM formats for these supported platforms:

Supported Linux platforms
DEB-based platforms RPM-based platforms
Ubuntu 16.04 CentOS and Red Hat Enterprise Linux 7
Ubuntu 18.04 Red Hat Enterprise Linux 8
Ubuntu 20.04  
Debian 9 (stretch)  
Debian 10 (buster)  

Percona Distribution for MySQL is only available for the x86_64 platform (also known as amd64).

Overview

Like other Percona products, we recommend to install Percona Distribution for MySQL from Percona repositories using the percona-release utility.

Percona provides two repositories for every deployment variant of Percona Distribution for MySQL.

The Major Release repository includes the latest version packages (e.g. pdps-8.0 and pdpxc-8.0). Whenever a package is updated, the package manager of your operating system detects that and prompts you to update. As long as you update all Distribution packages at the same time, you can ensure that the packages you’re using have been tested and verified by Percona. Installing Percona Distribution for MySQL from the Major Release Repository is the recommended method.

The Minor Release repository includes a particular minor release of the database and all of the packages that were tested and verified to work with that minor release (e.g. pdps-8.0.19 and pdpxc-8.0.19). You may choose to install Percona Distribution for MySQL from the Minor Release repository if you have decided to standardize on a particular release which has passed rigorous testing procedures and which has been verified to work with your applications. This allows you to deploy to a new host and ensure that you’ll be using the same version of all the Distribution packages, even if newer releases exist in other repositories.

The disadvantage of using a Minor Release repository is that you are locked in this particular release. When potentially critical fixes are released in a later minor version of the database, you will not be prompted for an upgrade by the package manager of your operating system. You would need to change the configured repository in order to install the upgrade.

Prerequisites

Install percona-release if you haven’t done it already. Otherwise, update it to the latest version. Please refer to Percona repositories documentation for installation or update instructions.

Enable Percona repository

We recommend to use the setup subcommand of percona-release to enable the desired repository.

  • For Percona Server for MySQL-based deployment, use the following command:

    $ sudo percona-release setup pdps-8.0
    
  • For Percona XtraDB Cluster-based deployment, use the following command:

    $ sudo percona-release setup pdpxc-8.0
    

Hint

To enable the minor version repository, use the following command:

$ #For PS-based deployment
$ sudo percona-release setup pdps-8.0.19
$ #For PXC-based deployment
$ sudo percona-relase setup pdpxc-8.0.19

Make sure to run percona-release as root or via sudo. For the sake of convenience, all commands that require elevated privileges start with sudo in the following procedures.

Install Percona Distribution for MySQL

Install the selected deployment of Percona Distribution for MySQL using the commands of the package manager of your operating system.

Important

Run all commands as root or via sudo.

Install Percona Server for MySQL-based deployment on Debian / Ubuntu

  1. Install Percona Server for MySQL:

    $ sudo apt-get install percona-server-server
    
  2. Install the components. Use the commands below to install the required components:

    $ #Install Percona XtraBackup
    $ sudo apt-get install percona-xtrabackup-80
    $ #Install Percona Toolkit
    $ sudo apt-get install percona-toolkit
    $ #Install Orchestrator
    $ sudo apt-get install percona-orchestrator percona-orchestrator-cli percona-orchestrator-client
    $ #Install MySQL Shell
    $ sudo apt-get install percona-mysql-shell
    $ #Install ProxySQL
    $ sudo apt-get install proxysql2
    $ #Install MySQL Router
    $ sudo apt-get install percona-mysql-router
    

Install Percona Server for MySQL-based deployment on Red Hat Enterprise Linux / CentOS

Platform Specific Notes

On CentOS 7, install the epel-release package. It includes the dependencies required to install Orchestrator. Use the following command:

$ sudo yum -y install epel-release
  1. Install Percona Server for MySQL:

    $ sudo yum install percona-server-server
    
  2. Install the components. Use the commands below to install the required components:

    $ #Install Orchestrator
    $ sudo yum install percona-orchestrator percona-orchestrator-cli percona-orchestrator-client
    $ #Install Percona XtraBackup
    $ sudo yum install percona-xtrabackup-80
    $ #Install Percona Toolkit
    $ sudo yum install percona-toolkit
    $ #Install MySQL Shell
    $ sudo yum install percona-mysql-shell
    $ #Install ProxySQL
    $ sudo yum install proxysql2
    $ #Install MySQL Router
    $ sudo yum install percona-mysql-router
    

Running Percona Distribution for MySQL

Percona Distribution for MySQL is not started automatically on Red Hat Enterprise Linux and CentOS after the installation is complete. Start it manually using the following command:

$ sudo systemctl start mysql

Confirm that the service is running:

$ sudo systemctl status mysql

Stop the service:

$ sudo systemctl stop mysql

Install Percona XtraDB Cluster-based deployment on Debian / Ubuntu

  1. Install Percona XtraDB Cluster:

    $ sudo apt-get install percona-xtradb-cluster
    
  2. Install HAProxy:

    $ sudo apt-get install percona-haproxy
    
  3. Install the components. Use the commands below to install the required components:

    $ #Install Percona XtraBackup
    $ sudo apt-get install percona-xtrabackup-80
    $ #Install Percona Toolkit
    $ sudo apt-get install percona-toolkit
    

Install Percona XtraDB Cluster-based deployment on Red Hat Enterprise Linux / CentOS

  1. Install Percona XtraDB Cluster:

    $ sudo yum install percona-xtradb-cluster
    
  2. Install HAProxy:

    $ sudo yum install percona-haproxy
    
  3. Install the components. Use the commands below to install the required components:

    $ #Install Percona XtraBackup
    $ sudo yum install percona-xtrabackup-80
    $ #Install Percona Toolkit
    $ sudo yum install percona-toolkit
    

Running Percona Distribution for MySQL

Percona Distribution for MySQL is not started automatically on Red Hat Enterprise Linux and CentOS after the installation is complete. Start it manually using the following command:

$ sudo systemctl start mysql

Confirm that the service is running:

$ sudo systemctl status mysql

Stop the service:

$ sudo systemctl stop mysql