Thursday, May 26, 2022

[SOLVED] Why is YUM showing that is installing MariaDB instead of MySQL on EC2

Issue

I just created medium size EC2 and ran command in it:

sudo yum install mysql -y


This is what is showing up:

Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.52-1.el7 will be installed
--> Finished Dependency Resolution

Install  1 Package

Total download size: 8.6 M
Installed size: 49 M
Downloading packages:
mariadb-5.5.52-1.el7.x86_64.rpm                                                                                                                                                    | 8.6 MB  00:00:01
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:mariadb-5.5.52-1.el7.x86_64                                                                                                                                                            1/1
  Verifying  : 1:mariadb-5.5.52-1.el7.x86_64                                                                                                                                                           1/1

Installed:
  mariadb.x86_64 1:5.5.52-1.el7

Complete!

Is this expected? I thought will see MySql packages ONLY. What is the relation between MariaDB and MySQL?


Solution

Yh, it's completely fine.

To put it simply, MySQL is not MariaDB - as MariaDB is a Drop in replacement for MySQL.


MariaDB is a backward compatible, binary drop-in replacement of MySQL. What this means is:

  • Data and table definition files (.frm) files are binary compatible.
  • All client APIs, protocols and structs are identical.
  • All filenames, binaries, paths, ports, sockets, and etc... should be the same.
  • All MySQL connectors work unchanged with MariaDB.
  • The mysql-client package also works with MariaDB server.

In most common practical scenarios, MariaDB version 5.x.y will work exactly like MySQL 5.x.y, MariaDB follows the version of MySQL, i.e. it's version number is used to indicate with which MySQL version it's compatible.


Edit 1: In apropos of comment

why this command does not work? sudo yum install mysql-server Loaded plugins: amazon-id, rhui-lb, search-disabled-repos No package mysql-server available.

By default MariaDB is supported - to install mysql-server you need to add it using RPM:

rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm

Once added, now you can install it:

yum -y install mysql-community-server


Answered By - Nabeel Ahmed
Answer Checked By - Marie Seifert (WPSolving Admin)