'Error in installing mysql on centos7 (No package mysql-community-server available)

I tried to install mysql on centos-7 for first time, and I did these steps

  1. sudo yum localinstall https://dev.mysql.com/get/mysql80-community-release-el7-1.noarch.rpm
  2. sudo yum install mysql-community-server

when I reach the step two I got this error

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.ges.net.pk
* epel: mirror.hostnet.nl
* extras: mirror.natro.com
* updates: mirror.radoreservers.com
No package mysql-community-server available.
Error: Nothing to do



Solution 1:[1]

1: wget http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm

2: rpm -ivh mysql-community-release-el7-5.noarch.rpm

3: yum install -y mysql-community-server

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 dogs Cute