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.
The Percona Software and Platform Lifecycle page lists supported platforms, products, and versions. Debian (DEB) packages support arm64 and other architectures across the documented Debian and Ubuntu releases.
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¶
To install Percona Server on Debian or Ubuntu, follow these steps:
-
Copy the command block in the following section and run the commands in order.
-
Use Configure authentication when the package manager prompts for authentication options.
-
Open Next steps to secure and configure the instance after the server packages install.
-
Expand the
Step-by-step: what each command doesnote for 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. The quickstart covers installation steps one through six and includes --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 consult the MySQL software repositories reference. Published names can change as Percona adds new series.
percona-release flag: --scheme
The command examples on this page pass --scheme https so repository URLs in APT source lists use HTTPS. The Percona Software Repositories — percona-release reference documents the --scheme flag. Supported values are 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 the MySQL 9.x authentication model documented for MySQL 9.6 . Key behaviors include the following:
-
The
default_authentication_pluginsystem variable is not available. -
MySQL removes the
mysql_native_passwordplugin in the 9.x series. -
MySQL 9.x removes the server-side native-password option.
-
New accounts use the
caching_sha2_passwordplugin. -
Applications and drivers must support
caching_sha2_password. -
TLS is required only when a security policy or deployment mandates encrypted traffic. The
caching_sha2_passwordplugin does not require TLS for every connection type.
When the package manager prompts during installation, follow the steps in Configure authentication. Prompt behavior depends on the package and distribution.
Step-by-step: what each command does
The following sections provide detailed explanations for each step:
-
The following
apt updatecommand updates the package lists for upgrades and 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 following
curl -Ocommand 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 repositories on the system. The command then enables the release repositories matching Percona Server for MySQL 9.7 for your distribution over HTTPS. See the Percona Software Repositories reference. Omit--scheme httpsonly when you require HTTP repository URLs, which is thepercona-releasedefault.sudo percona-release setup ps-97-lts --scheme https -
The
percona-release enable ps-97-lts release --scheme httpscommand enables the Percona Server for MySQL release repository 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 -
Verify the repository configuration by inspecting the
.listfiles under/etc/apt/sources.list.d/. The exact filename, such aspercona-original-release.list, depends on thepercona-releaseversion. -
The
sudo apt install -y percona-server-servercommand installs thepercona-server-serverpackage. During installation, the package manager may prompt for configuration values such as therootpassword. Some builds use debconf or post-install configuration only. For password prompts and automation, see Non-interactive installs and debconf. For account authentication defaults and removed plugins, see Configure authentication.sudo apt install -y percona-server-server
Configure authentication¶
The package manager may prompt for passwords or other options during installation. Adjust authentication after installation when the package skips prompts. Review the package manager 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 no longer used. Default authentication uses caching_sha2_password.
When migrating from a server that used native password authentication, update accounts and clients before deploying 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 when required. The default caching_sha2_password configuration requires no additional server settings.
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 installation completes, see Post-installation for 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. Common prompts include the following:
-
The MySQL
rootpassword -
Whether to reuse an existing data directory
-
Lowercase table names
The exact prompts depend on the percona-server-server package version and the 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, the release (for example, 22.04 compared with 24.04), and the exact percona-server-server package version. Template names do not depend on the Percona Server 9.7 product line alone.
Solution: Treat every preseed example in this section as illustrative until you confirm the keys on a disposable host that matches production.
-
Pick a reference lab image that mirrors production. Match the
.listrepositories, the distribution release, and the architecture. The following examples 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 additional questions can appear. -
On the lab host, or on a CI image built the same way, install the package version you plan to use in production, then capture the output:
lsb_release -a dpkg-query -W percona-server-server sudo debconf-show percona-server-server | tee debconf-percona-server-server.txtArchive
debconf-percona-server-server.txtnext to your automation, such as Ansible or cloud-init. Run the capture again after any base-image or package upgrade. -
For automation, pin the
percona-server-serverversion or document the build ID fromdpkg-query. Pinning keeps preseed scripts 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-serverThe package also ships template definitions at paths such as
/var/lib/dpkg/info/percona-server-server.templates.Verify the templates for each target. Preseed names and choices can differ by distribution, point release, and
percona-server-serverpackage version. Re-rundebconf-showafter upgrades or after a base-image change. For production automation, keep a checklist that maps distribution and package version to the saveddebconf-showoutput. The checklist keeps scripts aligned with the package prompts. -
Preseed answers with
debconf-set-selectionsbeforeapt install. The templates shipped with many Percona Server for MySQL 9.7 packages use thepercona-server-server/root-passandpercona-server-server/re-root-passnames for password prompts. For example:echo "percona-server-server percona-server-server/root-pass password <strong-password>" | sudo debconf-set-selections echo "percona-server-server percona-server-server/re-root-pass password <strong-password>" | sudo debconf-set-selectionsOther prompts, such as
percona-server-server/lowercase-table-namesorpercona-server-server/remove-data-dir, appear only in some upgrade or edge-case paths. Use thedebconf-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 open a UI. Combine non-interactive installs with preseeding. Without defaults for required questions, the Debian packageconfigurestep can fail or leave the server in an unexpected state.sudo DEBIAN_FRONTEND=noninteractive apt install -y percona-server-server
Default authentication plugin¶
When a distribution or package adds a debconf choice related to authentication, the prompt appears in debconf-show output for percona-server-server. On 9.7, native-password authentication is not available. Unattended installs must 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 install
-
Debian Wiki — debconf — how debconf and preseeding work on Debian-derived systems
Unattended installations¶
Use the same apt and percona-release sequence shown in Install Percona Server for MySQL using APT. Add -y to each sudo apt install line that needs non-interactive APT confirmations. Use non-interactive options for percona-release as shown 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)¶
User-defined functions (UDFs) extend MySQL with custom functions. Percona Server for MySQL includes UDFs from Percona Toolkit for data integrity checks and performance monitoring. These UDFs provide faster checksum calculations:
| Function | Description |
|---|---|
fnv_64 |
Fast 64-bit hash function |
fnv1a_64 |
Variant of fnv_64 with improved distribution |
murmur_hash |
High-performance non-cryptographic hash function |
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.