Unable to install a fresh version of MySQL on CentOS

Jacobian asked:

These are the steps, that I followed:

  1. cd /etc/yum.repos.d # go to repositories
  2. rpm -qf mysql-community.repo # get the name of old repositories to delete
  3. yum remove mysql57-community-release # it is 5.7, but I was unable to install it
  4. wget http://dev.mysql.com/get/mysql57-community-release-el6-7.noarch.rpm # download it again for my Centos 6.6
  5. yum localinstall mysql57-community-release-el6-7.noarch.rpm # install it
  6. yum repolist enabled | grep "mysql.*-community.*" # check that we have fresh versions, yes it’s ok, I see mysql57-community
  7. yum install mysql-community-server

The last step does not work. When I run this command, I see that for some incredibly insane reason CentOS tries to install mysql57-community-release-el7-7.noarch.rpm which is of course not compatible with CentOS 6.6. and therefore installation procedure fails. Why is that? Why does it take incorrect version, that I’ve not even downloaded??? And how to fix it? Thanks!!

EDIT

enter image description here

My answer:


I think this is the problem:

You replaced the mysql57-community repo for EL7 with the one for EL6, but yum still has cached metadata for the EL7 repo. Try clearing the metadata:

yum clean metadata

View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.