I have an use case where I need to install MySQL 5.7 on CentOS 9. I found a guide which describes how to do this on CentOS 8, and it works perfectly. However, when I try the same steps on CentOS 9, it gives an error.
Below is the repo file which I inserted as per the guide.
/etc/yum.repos.d/mysql-community.repo
[mysql57-community]
name=MySQL 5.7 Community Server
baseurl=http://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/
enabled=1
gpgcheck=0
[mysql-connectors-community]
name=MySQL Connectors Community
baseurl=http://repo.mysql.com/yum/mysql-connectors-community/el/7/$basearch/
enabled=1
gpgcheck=0
[mysql-tools-community]
name=MySQL Tools Community
baseurl=http://repo.mysql.com/yum/mysql-tools-community/el/7/$basearch/
enabled=1
gpgcheck=0
Then I ran this command:
sudo dnf install mysql-community-server
This command gives the below error.
Error:
Problem: package mysql-community-server-5.7.40-1.el7.x86_64 requires mysql-community-client(x86-64) >= 5.7.9, but none of the providers can be installed
.......
.......
MySQL 5.7 is not in CentOS / RHEL 8 AppStream repository as well. However, the above method worked on CentOS 8. Therefore, I feel this method should work on CentOS 9 as well. What am I missing here?
Best Answer
Short answer: You don't.
Long answer: Get the srpm and build it yourself.
Longer answer: Find someone who has already built it for EL9.
It seems only 8.0 is built officially for EL9. And you got lucky, somehow with installing an EL7 package on EL8