Centos – Yum: No package thesql-server available in Cent OS 7

centoscentos7MySQLyum

I just installed Apache on my new Digital Ocean Cent OS 7 x64 server. When following Digital Ocean's tutorial, yum cannot install mysql-server.

# yum install mysql mysql-server mysql-libs mysql-server
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.usinternet.com
 * extras: mirror.cogentco.com
 * updates: mirror.atlanticmetro.net
Package 1:mariadb-5.5.40-2.el7_0.x86_64 already installed and latest version
No package mysql-server available.
Package 1:mariadb-libs-5.5.40-2.el7_0.x86_64 already installed and latest version
No package mysql-server available.
Nothing to do

# service mysqld start
Redirecting to /bin/systemctl start  mysqld.service
Failed to issue method call: Unit mysqld.service failed to load: No such file or directory.

This is my 3rd server setting up mysql, but this one has stumped me.

Best Answer

In RHEL 7, and consequently in CentOS7, the mysql- packages (or most of them, anyway) have been replaced with mariadb- packages due to an upstream rename/fork. Simply yum install mariadb-server mariadb-libs mariadb and you should be okay - the command names themselves are still mostly mysql related.