Skip to Content

Solved: How do I fix “Unable to find a match” error when installing MySQL on CentOS

Problem Symptom

I am trying to install MySQL on a new CentOS server using the following command:

wget https://dev.mysql.com/get/mysql57-community-release-el7-8.noarch.rpm
sudo yum localinstall mysql57-community-release-el7-8.noarch.rpm
sudo yum install mysql-community-server

The detailed error message is as below:

Solved: How do I fix "Unable to find a match" error when installing MySQL on CentOS

All matches were filtered out by modular filtering for argument: mysql-community-server
Error: Unable to find a match: mysql-community-server

or

No match for argument: mysql-community-server
Error: Unable to find a match: mysql-community-server

I have update yum and run again the above command but getting the same results.

Follow the below solution steps to resolve the “Unable to find a match” error when installing MySQL on CentOS.

Solution

Execute the following command:

yum module disable mysql
yum install mysql-community-server

In the event that you received the transaction test error as below:

The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'yum clean packages'.
Error: Transaction test error:
  file /etc/my.cnf from install of mysql-community-server-5.7.35-1.el7.x86_64 conflicts with file from package mariadb-connector-c-config-3.1.11-2.el8_3.noarch

You can resolve the transaction test error using below command to install MySQL:

yum install mysql