Apt pinning the Percona Server for MySQL 8.4 packages¶
Apt pinning helps you control which version of a package is installed from different repositories. This is useful when you want to stay on a specific release such as Percona Server for MySQL 8.4 and avoid automatic upgrades from other sources.
To pin the Percona Server for MySQL 8.4 packages, follow these steps:
-
Create a preferences file in
/etc/apt/preferences.d/
named00percona.pref
:$ sudo nano /etc/apt/preferences.d/00percona.pref
-
Add the pinning configuration content to the file:
Package: percona-server-server Pin: release o=Percona Development Team,a=stable Pin-Priority: 1001
- The
Package
field specifies the exact name of the package. - The
Pin
field identifies the origin of the package, which is the Percona repository. - The
Pin-Priority
field sets the priority level. A value above 1000 ensures this version is preferred over others.
Save and close the file.
- The
-
Update package lists to refresh your package sources:
$ sudo apt update
-
Install Percona Server for MySQL 8.4 using the following command:
$ sudo apt install percona-server-server
Your system prioritizes the version from the Percona repository according to your pinning settings.
Learn more¶
For additional details, visit the debian wiki.