Use an APT repository to install Percona Server for MySQL 8.4¶
Ready-to-use packages are available from the Percona Server for MySQL software repositories and the Percona downloads page.
Specific information on the supported platforms, products, and versions—including which Debian and Ubuntu releases and CPU architectures (DEB packages include arm64, among others)—is described in Percona Software and Platform Lifecycle .
The percona-release tool is a command-line utility that simplifies the management and installation of Percona software packages, providing access to the latest versions and ensuring consistency across environments. For more information, refer to the Percona Software Repositories Documentation.
We gather Telemetry data in the Percona packages and Docker images.
Review Get help from Percona for ways that we can work with you.
Install Percona Server for MySQL using APT¶
If you are new to installing Percona Server on Debian or Ubuntu, copy the first command block below and run the commands in order. Use Configure authentication when the installer asks about the default authentication plugin. After the server packages are installed, open Next Steps for securing and configuring the instance. Expand the step-by-step section when you want an explanation of each command; use Non-interactive installs and debconf and Unattended installations only for scripted automation.
Run the following commands as a root user or with sudo:
sudo apt update
sudo apt install -y curl
curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb
sudo apt install -y gnupg2 lsb-release ./percona-release_latest.generic_all.deb
sudo percona-release setup ps-84-lts --scheme https
sudo percona-release enable ps-84-lts release --scheme https
sudo apt update
sudo apt install -y percona-server-server
The command sequence matches Install Percona Server for MySQL and create a database on Ubuntu (installation steps 1–6 there).
percona-release flag: --scheme
The command examples on the page pass --scheme https so repository URLs in APT source lists use HTTPS. The Percona Software Repositories — percona-release documentation describes the Flags section: the available flag is --scheme, with supported values HTTP and HTTPS; without the flag, the tool defaults to HTTP.
You can add --scheme https to subcommands such as setup, enable, enable-only, or disable following the same pattern as the examples. See the linked documentation for the full command reference.
Starting in 8.4, the mysql_native_password plugin is no longer loaded by default. When the package manager may prompt you during installation (depending on the package and distribution), follow the choices and steps in Configure authentication. If you choose legacy authentication but do not enable the plugin in configuration, clients may be unable to connect or the Percona Server service may fail to start.
Step-by-step: what each command does
The following sections provide detailed explanations for each step:
-
The
apt updatecommand shown below updates the package lists for upgrades and new package installations.sudoruns the command with superuser privileges;apt updateresynchronizes the package index files from the sources configured in/etc/apt/sources.listand/etc/apt/sources.list.d/.sudo apt update -
The
sudo apt install -y curlcommand installs thecurlpackage.curlis a command-line tool used to transfer data over networks and is required to download the Percona repository package.sudo apt install -y curl -
The
curl -Ocommand shown below downloads thepercona-release_latest.generic_all.debfile from the Percona APT repository. The-Ooption saves the file with the same name as in the URL.curl -O https://repo.percona.com/apt/percona-release_latest.generic_all.deb -
The
sudo apt install -y gnupg2 lsb-release ./percona-release_latest.generic_all.debcommand installsgnupg2(for package signature verification),lsb-release(for distribution information), and the downloaded Percona release package. Together,gnupg2,lsb-release, and the Percona release.debconfigure the Percona APT repository on your system.sudo apt install -y gnupg2 lsb-release ./percona-release_latest.generic_all.deb -
The
percona-release setup ps-84-lts --scheme httpscommand disables all current Percona repository locations on the system, then enables the release repositories that match Percona Server for MySQL 8.4 for your distribution over HTTPS (see the Percona Software Repositories documentation). Omit--scheme httpsonly if you intentionally want HTTP repository URLs (the tool default).sudo percona-release setup ps-84-lts --scheme https -
The
percona-release enable ps-84-lts release --scheme httpscommand turns on the Percona Server for MySQL release repository location with HTTPS URLs. Runapt updateafterward so APT loads package indexes for that repository (includingpercona-server-serverand related packages).sudo percona-release enable ps-84-lts release --scheme https sudo apt update -
You can verify the repository setup by inspecting the
.listfiles under/etc/apt/sources.list.d/(for examplepercona-original-release.list, depending on yourpercona-releaseversion). -
The
sudo apt install -y percona-server-servercommand installs thepercona-server-serverpackage. During installation, the package manager may prompt you to select the default authentication plugin (some builds use only debconf or post-install configuration); follow the Configure authentication section when a prompt or post-install step applies.sudo apt install -y percona-server-server
Configure authentication¶
During the installation process, the package manager may prompt you to select the default authentication plugin, or you may need to adjust authentication only after install—see your installer output and Non-interactive installs and debconf when automating.
Important change in 8.4
Percona Server for MySQL 8.4 inherits the upstream change where the mysql_native_password plugin is disabled by default.
Select Option 1 if you are setting up a new server or using modern application drivers.
The recommended option uses the caching_sha2_password plugin, providing superior security and performance. No further configuration is required.
Select Option 2 only if you must support legacy applications that cannot be updated.
If you choose Option 2, you must manually enable the plugin after installation, or the server will fail to authenticate users who rely on native-password authentication.
-
Open your configuration file (e.g.,
/etc/mysql/mysql.conf.d/mysqld.cnf). -
Add the following to the
[mysqld]section:[mysqld] mysql_native_password=ON -
Restart the service:
sudo systemctl restart mysql
See Configuring Percona repositories with percona-release for more information.
Percona Server for MySQL 8.4.x comes with the MyRocks storage engine. This storage engine is installed as a plugin. For information on installing and configuring MyRocks, refer to the Percona MyRocks Installation Guide.
Next Steps¶
After successful installation, see Post-installation for detailed steps to configure and secure your Percona Server for MySQL installation.
Non-interactive installs and debconf¶
Adding -y to apt install only skips APT confirmation prompts. The percona-server-server packages still run maintainer scripts that may ask debconf questions (for example the MySQL root password, whether to reuse an existing data directory, or lowercase table names, depending on your version and what is already on the disk).
To automate those prompts:
-
Discover the questions your package version uses. On a lab host, install once interactively or inspect templates, then run:
sudo debconf-show percona-server-serverTemplate definitions are also shipped with the package (paths such as
/var/lib/dpkg/info/percona-server-server.templates).Verify for each target: preseed names and choices can differ by distribution, point release, and
percona-server-serverpackage version. Re-rundebconf-showafter upgrades or when you change base image. For production automation, keep a short checklist (distro + package version → saveddebconf-showoutput) so scripts stay aligned with what the package actually asks. -
Preseed answers with
debconf-set-selectionsbeforeapt install. For the templates shipped with many Percona Server for MySQL 8.4 packages, password prompts use thepercona-server-server/root-passandpercona-server-server/re-root-passnames—for example:echo "percona-server-server percona-server-server/root-pass password choose-a-strong-secret" | sudo debconf-set-selections echo "percona-server-server percona-server-server/re-root-pass password choose-a-strong-secret" | sudo debconf-set-selectionsOther prompts (for example
percona-server-server/lowercase-table-namesorpercona-server-server/remove-data-dir) appear only in some upgrade or edge-case paths—usedebconf-showoutput to add matching lines. Do not commit real passwords to version control or broad shell history. -
Optional: set
DEBIAN_FRONTEND=noninteractivefor the install so debconf does not try to open a UI. Noninteractive installs are usually combined with preseeding; without defaults for required questions, the configure step can still fail or leave the server in an unexpected state.sudo DEBIAN_FRONTEND=noninteractive apt install -y percona-server-server
Default authentication plugin: if your distribution or package adds a debconf choice for the authentication plugin, that question shows up under debconf-show for percona-server-server. If the distribution or package does not add such a question, unattended installs still follow the same rules as an interactive install: use Configure authentication after the package is installed (for example mysql_native_password=ON in my.cnf when you need legacy auth).
See also
- Telemetry — disable collection for package installs with
PERCONA_TELEMETRY_DISABLE=1on the sameaptcommand line. - Authentication methods — options for
mysql_native_password,caching_sha2_password, and related settings. - Post-installation — secure and configure the server after packages are installed.
- Debian Wiki — debconf — how debconf and preseeding work on Debian-derived systems.
Unattended installations¶
For the same apt / percona-release sequence as in Install Percona Server for MySQL using APT, add -y to each sudo apt install line where you need non-interactive APT confirmations, and use non-interactive options for percona-release as in the following snippet.
The -y flag (on apt and apt-get, --assumeyes on dnf) tells the package manager to assume affirmative answers so installs do not block on prompts. That suits scripts and unattended installs, but you do not get a last chance to review dependency changes—use it only when you accept that tradeoff.
percona-release — The setup command documents -y for non-interactive repository configuration, for example:
sudo percona-release setup -y {{pkg}} --scheme https
If you use enable or enable-only instead, see sudo percona-release --help and the Percona Software Repositories documentation for flags your version supports.
Debian and Ubuntu (apt) — Add -y to each sudo apt install (or sudo apt-get install) you run, for example sudo apt install -y curl and sudo apt install -y percona-server-server.
To disable telemetry during an unattended server install, set PERCONA_TELEMETRY_DISABLE=1 on the same line (see Telemetry for details):
sudo PERCONA_TELEMETRY_DISABLE=1 apt install -y percona-server-server
RPM-based systems (dnf / yum) — Add -y (or yes) to install commands as supported by your tool. Example with telemetry disabled:
sudo PERCONA_TELEMETRY_DISABLE=1 dnf install -y percona-server-server
Use yum instead of dnf where that is the supported tool on your OS.
Install Percona Toolkit UDFs (Optional)¶
Percona Server for MySQL includes user-defined functions (UDFs) from Percona Toolkit . These UDFs provide faster checksum calculations:
-
fnv_64: Fast hash function -
fnv1a_64: Alternative fast hash function -
murmur_hash: High-performance hash function
User-Defined Functions (UDFs) are custom functions you can add to MySQL to extend MySQL capabilities. The Percona Toolkit UDFs are useful for data integrity checks and performance monitoring.
To install the Percona Toolkit UDFs after installation:
INSTALL COMPONENT 'file://component_percona_udf';
Expected output
Query OK, 0 rows affected (0.01 sec)
You can now use the UDFs in your SQL queries. For example: SELECT fnv_64('test_string');
For detailed information about the UDFs, see Percona Toolkit UDF functions.
Install the Percona testing repository using APT¶
Percona offers pre-release builds from the testing repository. As a superuser, run percona-release with the testing argument to enable the testing repository:
sudo percona-release enable ps-84-lts testing --scheme https
Do not run testing repository builds in production. The build may not contain all the features available in the final release and may change without notice.