MySQL 9.7, the latest LTS version, was released on April 21, 2026. It’s too new to be available from the various Linux distribution repositories where MySQL 8.4, the previous LTS version, is the current offering. If you want to use MySQL 9.7, you’ll need to install it from the Oracle repositories. But there are problems. As my testing was done on AlmaLinux, these issues apply to RHEL-based distributions. However, Debian/Ubuntu users should take note and be ready for possible speed bumps.
Oracle didn’t release a new repo package for MySQL 9.7. Instead, they updated the existing MySQL 8.4 repo package to add MySQL 9.7. When you go to the download page for the MySQL Community Server Yum Repository, you’ll find the repo packages are all mysql84-community-release RPMs. There is no mention that the repo package will install MySQL 9.7.
The repo files in the package can install MySQL 8.4 or 9.7, but the repositories for MySQL 8.4 are disabled. Only the repositories for MySQL 9.7 are enabled. Normally, this wouldn’t be a problem, but Oracle doesn’t use a version in the package names. Both MySQL 8.4 and 9.7 use the package name mysql-community-server, and this can have some big implications.
- MySQL 8.4 and 9.7 cannot be installed side-by-side from the Oracle repositories. If both the MySQL 8.4 and 9.7 repos are enabled, MySQL 9.7 is preferred over MySQL 8.4 since it’s the newer package and the MySQL 8.4 packages are hidden.
- If MySQL 8.4 was installed using the mysql84-community-release repo package before the release of MySQL 9.7 and the repo package is updated with the changes for MySQL 9.7, the next time the MySQL packages are updated, it will attempt an automatic upgrade from MySQL 8.4 to 9.7. When the repo package is installed directly from the URL (the repository @@commandline), it should not be automatically updated. But if the repo package does get updated, the MySQL 9.7 repositories must be disabled to prevent an upgrade of MySQL 8.4.
A bigger issue is that dependency checks for the Oracle repositories on RHEL 10, which includes AlmaLinux 10 and Rocky Linux 10, are completely broken. When installing MySQL 9.7, dnf will also install MariaDB 11.8 as a dependency, which will not work.
[root@almalinux ~]# dnf install mysql-community-server
Last metadata expiration check: 1:50:20 ago on Tue 30 Jun 2026 10:36:18 AM EDT.
Dependencies resolved.
====================================================================================================
Package Version Repository Size
====================================================================================================
Installing:
mysql-community-server 9.7.1-1.el10 mysql-9.7-lts-community 56 M
Installing dependencies:
mariadb-connector-c 3.4.4-1.el10 baseos 206 k
mariadb11.8 3:11.8.6-2.el10_2.alma.1 appstream 1.9 M
mariadb11.8-common 3:11.8.6-2.el10_2.alma.1 appstream 50 k
mariadb11.8-errmsg 3:11.8.6-2.el10_2.alma.1 appstream 214 k
mysql-community-client 9.7.1-1.el10 mysql-9.7-lts-community 3.4 M
mysql-community-client-plugins 9.7.1-1.el10 mysql-9.7-lts-community 1.5 M
mysql-community-common 9.7.1-1.el10 mysql-9.7-lts-community 641 k
mysql-community-icu-data-files 9.7.1-1.el10 mysql-9.7-lts-community 2.3 M
mysql-community-libs 9.7.1-1.el10 mysql-9.7-lts-community 1.5 M
mysql-selinux 1.0.14-1.el10_0 appstream 37 k
perl-DBD-MariaDB 1.23-10.el10 appstream 153 k
perl-DBI 1.643-26.el10 appstream 713 k
perl-File-Copy 2.41-512.2.el10_0 appstream 20 k
perl-Math-BigInt 1:2.0030.03-3.el10 appstream 231 k
perl-Math-Complex 1.62-512.2.el10_0 appstream 46 k
perl-Sys-Hostname 1.25-512.2.el10_0 appstream 17 k
Installing weak dependencies:
mariadb11.8-backup 3:11.8.6-2.el10_2.alma.1 appstream 6.7 M
mariadb11.8-client-utils 3:11.8.6-2.el10_2.alma.1 appstream 66 k
mariadb11.8-gssapi-server 3:11.8.6-2.el10_2.alma.1 appstream 16 k
mariadb11.8-server 3:11.8.6-2.el10_2.alma.1 appstream 10 M
mariadb11.8-server-utils 3:11.8.6-2.el10_2.alma.1 appstream 25 k
Transaction Summary
=====================================================================================================
Install 22 Packages
While excluding the MariaDB packages would seem the obvious fix, this just causes dnf to install MySQL 8.4 from the distribution repositories as a dependency.
[root@almalinux ~]# dnf install --exclude=mariadb* mysql-community-server
Last metadata expiration check: 2:01:38 ago on Tue 30 Jun 2026 10:36:18 AM EDT.
Dependencies resolved.
=================================================================================================
Package Version Repository Size
=================================================================================================
Installing:
mysql-community-server 9.7.1-1.el10 mysql-9.7-lts-community 56 M
Installing dependencies:
mecab 0.996-9.el10 appstream 361 k
mysql-community-client 9.7.1-1.el10 mysql-9.7-lts-community 3.4 M
mysql-community-client-plugins 9.7.1-1.el10 mysql-9.7-lts-community 1.5 M
mysql-community-common 9.7.1-1.el10 mysql-9.7-lts-community 641 k
mysql-community-icu-data-files 9.7.1-1.el10 mysql-9.7-lts-community 2.3 M
mysql-community-libs 9.7.1-1.el10 mysql-9.7-lts-community 1.5 M
mysql-selinux 1.0.14-1.el10_0 appstream 37 k
mysql8.4 8.4.9-1.el10_2.alma.1 appstream 2.6 M
mysql8.4-common 8.4.9-1.el10_2.alma.1 appstream 69 k
mysql8.4-errmsg 8.4.9-1.el10_2.alma.1 appstream 523 k
protobuf-lite 3.19.6-15.el10_1 appstream 258 k
Installing weak dependencies:
mysql8.4-server 8.4.9-1.el10_2.alma.1 appstream 18 M
Transaction Summary
=================================================================================================
Install 13 Packages
To install MySQL 9.7 from the Oracle repositories, both MariaDB and MySQL from the distribution repositories must be disabled. But when this is done, mysql-selinux, which is needed for SELinux support, is no longer a dependency. Thus, mysql-selinux must be explicitly installed along with mysql-community-server.
[root@almalinux ~]# dnf install --exclude=mariadb* --exclude=mysql8* mysql-community-server mysql-selinux
Last metadata expiration check: 0:10:02 ago on Tue 30 Jun 2026 03:31:13 PM EDT.
Dependencies resolved.
============================================================================================
Package Version Repository Size
============================================================================================
Installing:
mysql-community-server 9.7.1-1.el10 mysql-9.7-lts-community 56 M
mysql-selinux 1.0.14-1.el10_0 appstream 37 k
Installing dependencies:
mysql-community-client 9.7.1-1.el10 mysql-9.7-lts-community 3.4 M
mysql-community-client-plugins 9.7.1-1.el10 mysql-9.7-lts-community 1.5 M
mysql-community-common 9.7.1-1.el10 mysql-9.7-lts-community 641 k
mysql-community-icu-data-files 9.7.1-1.el10 mysql-9.7-lts-community 2.3 M
mysql-community-libs 9.7.1-1.el10 mysql-9.7-lts-community 1.5 M
Transaction Summary
============================================================================================
Install 7 Packages
This will successfully install MySQL 9.7.
This appears to only affect Version 10 of AlmaLinux, RHEL, and Rocky Linux. Versions 8 and 9 correctly resolve the dependencies. It may be fixed in a future update, but only time will tell.
Whether the unwanted dependencies will return when updates for MySQL 9.7 are available is unknown as no updates have yet been released. It’s probably best to add the following to /etc/dnf/dnf.conf to ensure they will not be installed.
excludepkgs=mariadb*,mysql8*
Leave a Reply