Resources / Blogs
No package mysql-server available
How to Install MySQL Community edition on CentOS7 and resolving error - No package mysql-server available. Follow us on social media.

Starting CentOS7 MySQL is replaced with MariaDB. You might encounter the following error “mysql -u root -p4Samsung4” when you try installing mysql using yum.
[root@myhost~]# yum install mysql-serverLoaded plugins: fastestmirror, langpacksLoading mirror speeds from cached hostfile* base: mirror.es.its.nyu.edu* extras: mirrors.rit.edu* updates: mirrors.advancedhosters.comNo package mysql-server available.Error: Nothing to do
Use the below command to update yum repository with mysql-community edition:
sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-relea-el7-5.noarch.rpm
Once you update the yum repository, you should be able to install MySQL without any issues:[root@c7svr01 ~]# sudo yum install mysql-serverLoaded plugins: fastestmirror, langpacksmysql-connectors-community | 2.5 kB 00:00mysql-tools-community | 2.5 kB 00:00mysql56-community | 2.5 kB 00:00(1/3): mysql-connectors-community/x86_64/primary_db | 11 kB 00:00(2/3): mysql-tools-community/x86_64/primary_db | 29 kB 00:00(3/3): mysql56-community/x86_64/primary_db | 152 kB 00:00Loading mirror speeds from cached hostfile* base: mirror.es.its.nyu.edu* extras: mirrors.rit.edu* updates: mirrors.advancedhosters.comResolving Dependencies--> Running transaction check---> Package mysql-community-server.x86_64 0:5.6.34-2.el7 will be installed--> Processing Dependency: mysql-community-common(x86-64) = 5.6.34-2.el7 for pac kage: mysql-community-server-5.6.34-2.el7.x86_64--> Processing Dependency: mysql-community-client(x86-64) >= 5.6.10 for package: mysql-community-server-5.6.34-2.el7.x86_64--> Running transaction check---> Package mysql-community-client.x86_64 0:5.6.34-2.el7 will be installed--> Processing Dependency: mysql-community-libs(x86-64) >= 5.6.10 for package: m ysql-community-client-5.6.34-2.el7.x86_64---> Package mysql-community-common.x86_64 0:5.6.34-2.el7 will be installed--> Running transaction check---> Package mysql-community-libs.x86_64 0:5.6.34-2.el7 will be installed--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
mysql-community-server x86_64 5.6.34-2.el7 mysql56-community 59 M
Installing for dependencies:
mysql-community-client x86_64 5.6.34-2.el7 mysql56-community 19 M
mysql-community-common x86_64 5.6.34-2.el7 mysql56-community 257 k
mysql-community-libs x86_64 5.6.34-2.el7 mysql56-community 2.0 M
Transaction Summary
================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 80 M
Installed size: 348 M
Is this ok : y
Downloading packages:
(1/4): mysql-community-common-5.6.34-2.el7.x86_64.rpm | 257 kB 00:00
(2/4): mysql-community-libs-5.6.34-2.el7.x86_64.rpm | 2.0 MB 00:00
(3/4): mysql-community-client-5.6.34-2.el7.x86_64.rpm | 19 MB 00:03
(4/4): mysql-community-server-5.6.34-2.el7.x86_64.rpm | 59 MB 00:07
——————————————————————————–
Total 10 MB/s | 80 MB 00:07
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
Installing : mysql-community-common-5.6.34-2.el7.x86_64 1/
Installing : mysql-community-libs-5.6.34-2.el7.x86_64 2/
Installing : mysql-community-client-5.6.34-2.el7.x86_64 3/
Installing : mysql-community-server-5.6.34-2.el7.x86_64 4/
Verifying : mysql-community-server-5.6.34-2.el7.x86_64 1/
Verifying : mysql-community-client-5.6.34-2.el7.x86_64 2/
Verifying : mysql-community-common-5.6.34-2.el7.x86_64 3/
Verifying : mysql-community-libs-5.6.34-2.el7.x86_64 4/
Installed:
mysql-community-server.x86_64 0:5.6.34-2.el7
Dependency Installed:
mysql-community-client.x86_64 0:5.6.34-2.el7
mysql-community-common.x86_64 0:5.6.34-2.el7
mysql-community-libs.x86_64 0:5.6.34-2.el7
Complete!


