How To Install Percona on Linux Mint 22

Install Percona on Linux Mint 22

If you run MySQL on Linux Mint and keep hitting performance ceilings, the problem is often not your queries but the database engine underneath them. MySQL Community Edition ships with conservative default settings and withholds enterprise-grade features behind a paid license. Percona Server for MySQL solves both problems. It is a fully open-source, drop-in replacement for MySQL that delivers thread pooling, advanced InnoDB metrics, PAM authentication, and audit logging at zero cost. This guide walks you through how to install Percona on Linux Mint 22 from scratch, covering every step from system preparation to post-install security hardening.

Linux Mint 22 “Wilma” is built on Ubuntu 24.04 LTS (Noble Numbat). This detail matters because the Percona APT repository uses the Ubuntu codename to serve the right packages. If you treat Linux Mint 22 as a generic Debian system when setting up the repo, you will pull packages for the wrong distro version, which leads to broken dependencies or missing packages. Everything in this guide accounts for that Noble base.

By the end of this tutorial, you will have Percona Server 8.0 installed, running as a systemd service, secured with mysql_secure_installation, and verified through the MySQL client. No manual binary downloads, no PPA workarounds, and no configuration guesswork.

Prerequisites Before You Start

Before you run a single command, make sure your environment checks out. Skipping this section is the most common reason installations fail halfway through.

  • Operating system: Linux Mint 22.x (Wilma, Xia, Zara, or Zena). All point releases share the Ubuntu 24.04 Noble base.
  • Required permissions: A user account with sudo access. Running everything as root directly is a bad habit on desktop Linux systems. Use sudo for each privileged operation.
  • Disk space: At least 700 MB free. The Percona Server package set expands to roughly 612 MB after installation.
  • Network access: A stable internet connection. The installer pulls packages from repo.percona.com.
  • Clean MySQL state: If MySQL Community or MariaDB is already installed, you must remove it first. Percona and MySQL share the mysql-server virtual package name, and apt will refuse to install both.
  • Required tools: curl, gnupg2, and lsb-release. The guide installs these in Step 3 if you do not have them.

Step 1: Update Your System Package Index

Every Linux server tutorial worth reading starts here, and this one is no different. Before touching any repositories, refresh your local package index and apply pending updates.

sudo apt update && sudo apt upgrade -y

What this does: apt update contacts each repository listed in /etc/apt/sources.list and downloads fresh metadata, so your system knows which versions of packages are currently available. apt upgrade applies any outstanding security patches and library updates.

Why this matters: If libc or libssl is behind by a version, Percona’s dependency resolver may hit a conflict mid-install and leave the package in a broken half-configured state. Updating first removes that risk entirely.

If the upgrade installs a new kernel, reboot before continuing:

sudo reboot

Percona Server links against kernel-level libraries (libaio). A mismatch between the running kernel and the newly installed headers can produce cryptic startup errors later.

Step 2: Remove Existing MySQL or MariaDB Installations

If your system has never had MySQL or MariaDB installed, skip to Step 3. If either is present, remove it cleanly now.

sudo apt remove --purge mysql-server mysql-client mysql-common -y
sudo apt remove --purge mariadb-server mariadb-client -y
sudo apt autoremove -y

What --purge does: Unlike a plain apt remove, the --purge flag deletes configuration files along with the binaries. Leftover config files in /etc/mysql/ can silently override Percona’s own configuration after installation.

Why remove the data directory too: If you have no data worth keeping, also delete the old MySQL data directory:

sudo rm -rf /etc/mysql /var/lib/mysql

Important: If you have existing databases with data you need, export them first with mysqldump before running any of these commands. The rm -rf on /var/lib/mysql is permanent.

Why this step cannot be skipped: Both mysql-server and percona-server-server provide the same virtual package to APT. If MySQL is still installed, APT treats Percona as a duplicate provider and blocks the installation with a conflict error.

Step 3: Install curl, gnupg2, and lsb-release

These three packages are the scaffolding for the Percona repository setup. Without them, the next two steps will fail.

sudo apt update
sudo apt install -y curl gnupg2 lsb-release

Why curl: You need it to download the Percona repository bootstrap .deb file directly from repo.percona.com.

Why gnupg2: APT uses GPG keys to verify that packages come from a trusted source before installing them. Without gnupg2, APT cannot authenticate the Percona repository key and will throw a signature verification error on every package download.

Why lsb-release: The percona-release tool runs lsb_release -sc internally to detect your distro codename. On Linux Mint 22, that returns noble, which is exactly the codename that maps to the correct Percona package repository for Ubuntu 24.04.

Expected output ends with:

lsb-release is already the newest version (12.0-1).
gnupg2 is already the newest version (2.4.4-2ubuntu17).

The exact versions shown will vary. What matters is no error on any line.

Step 4: Download and Install the Percona Repository Package

This step registers Percona’s official APT repository on your system. Think of it as handing your package manager an invitation to a new software source.

Download the percona-release .deb File

curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb

What this does: Downloads percona-release_latest.generic_all.deb into your current directory. The generic_all in the filename signals that this package uses lsb_release to auto-detect the correct distro, rather than being hard-coded for a specific Ubuntu version.

Expected output:

% Total    % Received % Xferd  Average Speed   Time    Current
                                Dload  Upload   Total   Spent    Speed
100 11804  100 11804    0     0  17375      0  --:--:-- 17358

Install the Package and Its Dependencies

sudo apt install gnupg2 lsb-release ./percona-release_latest.generic_all.deb

Why the ./ prefix matters: Without it, APT searches its cache for a package named percona-release_latest.generic_all.deb and returns “package not found.” The ./ tells APT to install the file from the local path, not from a repository.

Why install gnupg2 and lsb-release again in this command: This is a safety net. If either package was not installed in Step 3, this command installs them together with the .deb file so the bootstrap process completes in one go.

After installation, refresh the package cache:

sudo apt update

Why: The percona-release package just added new source list entries to /etc/apt/sources.list.d/. APT does not automatically refresh after package installations. Running apt update now makes those new repository entries visible so subsequent steps can find Percona packages.

You can confirm the repository file was created:

cat /etc/apt/sources.list.d/percona-original-release.list

If that file exists and contains repo.percona.com, the bootstrap succeeded.

Step 5: Enable the Percona Server 8.0 Repository

Now you configure which specific Percona product line you want to install. Percona offers multiple products (Server, XtraBackup, Toolkit, XtraDB Cluster), and each uses a separate repository that you enable on demand.

sudo percona-release setup ps80

What this does: The setup command does two things in one shot. It disables all currently active Percona repositories first, then enables the Percona Server 8.0 repository cleanly. This prevents version conflicts if you had previously enabled a different Percona repository.

Why choose ps80 over ps84-lts: Percona Server 8.0 is the production-proven LTS branch with the widest ecosystem compatibility. Percona 8.4 introduces new defaults like mandatory GTID replication, which breaks applications written against MySQL 8.0 behavior. For most teams doing a first Percona setup, 8.0 is the lower-risk choice.

Expected output:

* Disabling all Percona Repositories
* Enabling the Percona Server 8.0 repository
* Enabling the Percona Tools repository
<*> All done!

Now refresh again:

sudo apt update

You should now see a line like Get:X http://repo.percona.com/ps-80/apt noble InRelease in the output. That confirms the ps80 channel is live.

Step 6: Install Percona on Linux Mint 22

This is the main event. One command pulls down the entire Percona Server stack and sets it up as a systemd service.

sudo apt install -y percona-server-server

What gets installed: The percona-server-server metapackage pulls in percona-server-client, percona-server-common, libaio1, libmecab2, and debsums automatically. You do not need to specify each one individually.

The installer will prompt you to:

  1. Enter a root password — Choose a strong one and store it somewhere safe. This is the MySQL root account, not your Linux user account.
  2. Confirm the password — Re-enter it exactly.
  3. Choose authentication type — Select Strong Password Encryption unless you are connecting with an older client library that only supports the legacy method.

Why strong encryption matters: The legacy mysql_native_password plugin stores password hashes using SHA1, which modern cracking tools can attack faster. The strong option uses caching_sha2_password, which is significantly more resistant to offline brute-force attempts.

Expected disk usage output:

Need to get 172 MB of archives.
After this operation, 612 MB of additional disk space will be used.

Wait for the process to complete. It takes 1 to 3 minutes depending on your connection and hardware.

Step 7: Start and Enable the Percona Service

After installation, Percona Server should start automatically. Verify that and lock in the auto-start behavior.

sudo systemctl start mysql
sudo systemctl enable mysql
sudo systemctl status mysql

Why systemctl start: On some Linux Mint configurations, the service does not auto-start immediately after install. Running start explicitly makes the MySQL socket available right now without waiting for a reboot.

Why systemctl enable: This registers the service to start automatically on every boot. Without it, your database goes offline every time the machine restarts, which is a painful surprise in production.

Why check status before moving on: The status command gives you a real-time health check. A healthy service shows:

● mysql.service - Percona Server
   Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
   Active: active (running) since ...
   Status: "Server is operational"

If the status shows failed, read the output carefully. It will include the specific error code, usually a port conflict (3306 already in use) or a corrupted data directory. Both are fixable, and the Troubleshooting section below covers them.

Step 8: Secure the Percona Installation

A fresh Percona install comes with a default test database, anonymous user accounts, and a root account that can connect from anywhere. Every single one of those defaults is a security liability. Run the security script to fix them all.

sudo mysql_secure_installation

The script walks you through these prompts:

Set Up Password Validation

Why: The VALIDATE PASSWORD component enforces minimum complexity rules on all new passwords. Without it, a developer can create a user with the password 123. Set the policy to MEDIUM (option 1) at minimum for any non-localhost deployment.

Remove Anonymous Users

Why: The default anonymous user lets anyone on the local machine connect to MySQL without credentials. On a shared development machine, that means any local user account can read your databases.

Disallow Remote Root Login

Why: Root access over a network is one of the top attack vectors for exposed databases. Restrict root to localhost and use a dedicated non-root account for any application that connects remotely.

Remove the Test Database

Why: The test database has default open permissions. Any authenticated user can write to it, which is both a data risk and a foothold for further exploitation. Remove it.

Reload Privilege Tables

Why: MySQL caches its grant tables in memory. Without reloading, the user and permission changes you just made sit in the config files but are not yet active in the running server. Reloading applies them immediately without a service restart.

After the script completes, it confirms: All done!

Step 9: Verify the Percona Installation

Do not assume the install worked. Verify it explicitly. This two-minute check saves hours of debugging later when something behaves unexpectedly.

mysql -u root -p

Enter your root password. You should see:

Welcome to the MySQL monitor.
Server version: 8.0.45 Percona Server (GPL), Release '27', Revision '2f8eeab2'

The phrase Percona Server (GPL) in the version string is your confirmation. If you see plain MySQL Community Server, Percona did not install correctly and the old MySQL binary is still in use.

Inside the MySQL shell, run these verification queries:

SELECT VERSION();
SHOW VARIABLES LIKE 'version_comment';
SHOW VARIABLES LIKE 'innodb_io_capacity';

Why version_comment: Returns Percona Server (GPL). This is the authoritative string that separates a genuine Percona install from a regular MySQL instance.

Why innodb_io_capacity: Percona sets this to a much higher default than stock MySQL. Seeing a value above 200 confirms that Percona’s enhanced InnoDB defaults are active and your database engine will behave accordingly under I/O load.

Step 10: Basic Post-Install Configuration for Percona on Linux Mint 22 Setup

The default configuration is functional but not optimized. Open the main config file and review three settings before putting the database to real use.

sudo nano /etc/mysql/mysql.conf.d/mysqld.cnf

Tune innodb_buffer_pool_size

innodb_buffer_pool_size = 1G

Why: This is the single highest-impact InnoDB configuration setting. It controls how much RAM InnoDB uses to cache data and index pages. The default is only 128 MB. A general rule from experienced DBAs: set this to 70% of available RAM for a dedicated database server.

Enable the Slow Query Log

slow_query_log = 1
slow_query_log_file = /var/log/mysql/mysql-slow.log
long_query_time = 2

Why: You cannot optimize queries you cannot see. Enabling the slow query log captures every query that takes longer than long_query_time seconds. Pair this with pt-query-digest from Percona Toolkit later to identify the worst offenders.

Restrict the Bind Address

bind-address = 127.0.0.1

Why: This setting restricts MySQL to accept connections only from localhost. Change this to 0.0.0.0 only if your application lives on a different server, and only after configuring ufw firewall rules to limit which IPs can reach port 3306.

After any change, restart the service:

sudo systemctl restart mysql

Why restart: mysqld reads mysqld.cnf only at startup. Configuration changes do not take effect live; a restart is required to apply them.

Troubleshooting Common Issues

Even when you follow every step carefully, things sometimes go sideways. Here are the five most common problems and how to fix each one.

Error 1: dpkg: error processing package percona-server-server

This usually means a leftover /var/lib/mysql directory from a previous MySQL install is blocking the data directory initialization.

Fix:

sudo systemctl stop mysql
sudo rm -rf /var/lib/mysql
sudo apt install -y percona-server-server

Error 2: ERROR 1698 (28000): Access denied for user 'root'@'localhost'

Percona 8.0 on Ubuntu-based systems sometimes defaults to auth_socket for the root account, meaning the standard mysql -u root -p command fails even with the correct password.

Fix: Connect without a password using sudo first:

sudo mysql

Then alter the root authentication method:

ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY 'your_password';
FLUSH PRIVILEGES;

Error 3: percona-release setup ps80 returns “Specified repository is not supported”

Your percona-release package is outdated. The version downloaded earlier may have a stale supported-platforms list.

Fix:

curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb
sudo apt install ./percona-release_latest.generic_all.deb
sudo percona-release setup ps80

Error 4: Service shows failed after install

Port 3306 is already in use by a stale process, or the data directory initialization failed silently.

Fix: Check what is using port 3306:

sudo ss -tulnp | grep 3306

Kill or stop the conflicting process, then start Percona:

sudo systemctl start mysql

Error 5: GPG key errors on apt update after adding the Percona repo

This happens when gnupg2 was not installed before the percona-release package was added. The repo key was never imported properly.

Fix:

sudo apt install gnupg2
sudo apt install ./percona-release_latest.generic_all.deb
sudo apt update

Uninstalling Percona Server (If Needed)

If you need to roll back or switch to a different database server, remove Percona cleanly with these commands:

sudo apt remove --purge percona-server-server percona-server-client percona-server-common -y
sudo apt autoremove -y
sudo rm -rf /var/lib/mysql /etc/mysql
sudo rm /etc/apt/sources.list.d/percona-ps-80-release.list
sudo apt update

Why --purge and not just remove: A plain remove leaves configuration files behind, which a future reinstall will pick up silently. Using --purge gives you a completely clean slate.

Why remove the source list file: Without removing the Percona source entry, apt update will continue trying to contact repo.percona.com on every run and may throw key verification errors once the Percona packages are gone.

Congratulations! You have successfully installed Percona. Thanks for using this tutorial to install the latest version of the Percona Server on Linux Mint 22 system. For additional help or useful information, we recommend you check the official Percona website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!
r00t is a Linux Systems Administrator and open-source advocate with over ten years of hands-on experience in server infrastructure, system hardening, and performance tuning. Having worked across distributions such as Debian, Arch, RHEL, and Ubuntu, he brings real-world depth to every article published on this blog. r00t writes to bridge the gap between complex sysadmin concepts and practical, everyday application — whether you are configuring your first server or optimizing a production environment. Based in New York, US, he is a firm believer that knowledge, like open-source software, is best when shared freely.

Related Posts