Use an APT repository to install Percona Server for MySQL 9.7¶
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 authentication options. After the server packages are installed, open Next Steps for securing and configuring the instance. Expand the Step-by-step: what each command does note 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-97-lts --scheme https
sudo percona-release enable ps-97-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), including --scheme https on percona-release setup and enable. The repository identifier for 9.7 is ps-97-lts. For another Percona Server for MySQL series, use the name shown by sudo percona-release list or in MySQL software repositories for that release (published names can change as new series are added).
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 --scheme, percona-release defaults to HTTP URLs.
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.
Percona Server for MySQL 9.7 follows MySQL 9.x authentication behavior—the same model described for MySQL 9.6 : default_authentication_plugin is not available, and MySQL has removed the mysql_native_password plugin in the 9.x series. New accounts use caching_sha2_password. When the package manager may prompt you during installation (depending on the package and distribution), follow the choices and steps in Configure authentication. Applications and drivers must support caching_sha2_password. Use TLS for network connections when your security policy or deployment requires encrypted traffic; caching_sha2_password does not mandate TLS for every connection type. There is no server-side native-password option on MySQL 9.x.
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-97-lts --scheme httpscommand disables all current Percona repository locations on the system, then enables the release repositories matching Percona Server for MySQL 9.7 for your distribution over HTTPS (see the Percona Software Repositories documentation). Omit--scheme httpsonly if you intentionally want HTTP repository URLs (percona-releasedefault).sudo percona-release setup ps-97-lts --scheme https -
The
percona-release enable ps-97-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 the Percona APT repository (includingpercona-server-serverand related packages).sudo percona-release enable ps-97-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 for configuration such as therootpassword (some builds use only debconf or post-install configuration). For password prompts and automation, see Non-interactive installs and debconf. For how the server authenticates accounts (defaults and removed plugins), see Configure authentication.sudo apt install -y percona-server-server
Configure authentication¶
During the installation process, the package manager may prompt you for passwords or other options, 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 9.7
Percona Server for MySQL 9.7 inherits MySQL 9.x behavior: the mysql_native_password plugin is removed. The default_authentication_plugin system variable is also not used. New and default authentication uses caching_sha2_password. If you are moving from an older server that still used native password authentication, migrate accounts and clients before relying on 9.7—see Authentication methods and Upgrade checklist for 9.7.
For new installations on 9.7, the server uses the caching_sha2_password plugin for password-based authentication. Ensure your client libraries and connectors support the caching_sha2_password plugin (and TLS, if required). No extra server configuration is required for the default caching_sha2_password authentication setup.
See Configuring Percona repositories with percona-release for more information.
Percona Server for MySQL 9.7.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 Percona Server package version and data already present on the disk).
Lab baseline and validating debconf on your OS¶
Debconf template names and valid answers depend on the Linux distribution, release (for example 22.04 vs 24.04), and the exact percona-server-server package version, not on the Percona Server 9.7 product line alone.
Solution: Treat every preseed example in the Non-interactive installs and debconf section as illustrative until you confirm the keys on a disposable host that matches production.
- Pick a reference lab image that mirrors production (same
.listrepos, same distro release, same architecture). The examples below were drafted against Ubuntu 22.04 LTS (Jammy) and Percona Server for MySQL 9.7 packages from the Percona APT repository; on Debian, Ubuntu 24.04 LTS, or another SKU, keys can differ or extra questions can appear. - On that lab host (or a CI image built the same way), install the same package version you plan in production, then capture output:
Archive
lsb_release -a dpkg-query -W percona-server-server sudo debconf-show percona-server-server | tee debconf-percona-server-server.txtdebconf-percona-server-server.txtnext to your automation (Ansible, cloud-init, and so on) and run the capture again after any base-image or package upgrade. - For automation, prefer pinning the
percona-server-serverversion (or documenting the build ID fromdpkg-query) so preseed scripts stay tied to a knowndebconf-showresult.
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 9.7 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 thepercona-server-serverinstall so debconf does not try to open a UI. Noninteractive installs are usually combined with preseeding; without defaults for required questions, the Debian packageconfigurestep 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 related to authentication, the prompt appears under debconf-show for percona-server-server. On 9.7, native-password authentication is not available; unattended installs should assume caching_sha2_password and client compatibility as described in Configure authentication.
See also
- Telemetry — disable collection for package installs with
PERCONA_TELEMETRY_DISABLE=1on the sameaptcommand line. - Authentication methods —
caching_sha2_passwordand 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 automatically confirms all actions without asking for user input. This makes running commands smoother, especially in situations where you can’t or don’t want to interact, like during unattended installations or automated scripts. However, keep in mind that using the -y flag skips confirmation prompts, which means you won’t have a chance to review any changes before they’re made. So, it’s best to use this flag only when you’re sure about the command you’re executing.
The recommended syntax for using this flag with the percona-release setup is:
$ percona-release setup -y ps-97-lts
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 the Percona Server packages are installed:
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-97-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.