Installing MySQL

Installing MariaDB on CentOS 7

The installation of MariaDB is quite similar to the installation of MySQL you’ll find that the CLI commands are almost the same, just with a few small differences.

You can install MariaDB using the root account or another user with “sudo” privileges

yum -y install mariadb-server mariadb
Installing MariaDB (MySQL) in CentOS 7

MariaDB Installation Log

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror-centos-jpa.hostdime.com.br
 * extras: mirror-centos-jpa.hostdime.com.br
 * updates: mirror.ci.ifes.edu.br
base                                                     | 3.6 kB     00:00     
extras                                                   | 2.9 kB     00:00     
updates                                                  | 2.9 kB     00:00     
updates/7/x86_64/primary_db                                | 6.7 MB   00:16     
Resolving Dependencies
--> Running transaction check
---> Package mariadb.x86_64 1:5.5.64-1.el7 will be installed
--> Processing Dependency: perl(Sys::Hostname) for package: 1:mariadb-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(IPC::Open3) for package: 1:mariadb-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(Getopt::Long) for package: 1:mariadb-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(File::Temp) for package: 1:mariadb-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(Fcntl) for package: 1:mariadb-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(Exporter) for package: 1:mariadb-5.5.64-1.el7.x86_64
--> Processing Dependency: /usr/bin/perl for package: 1:mariadb-5.5.64-1.el7.x86_64
---> Package mariadb-server.x86_64 1:5.5.64-1.el7 will be installed
--> Processing Dependency: perl-DBI for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: perl-DBD-MySQL for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(File::Path) for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(Data::Dumper) for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Processing Dependency: perl(DBI) for package: 1:mariadb-server-5.5.64-1.el7.x86_64
--> Running transaction check
---> Package perl.x86_64 4:5.16.3-294.el7_6 will be installed
--> Processing Dependency: perl-libs = 4:5.16.3-294.el7_6 for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Socket) >= 1.3 for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Scalar::Util) >= 1.10 for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl-macros for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl-libs for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(threads::shared) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(threads) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(constant) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Time::Local) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Time::HiRes) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Storable) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Socket) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Scalar::Util) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Pod::Simple::XHTML) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Pod::Simple::Search) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Filter::Util::Call) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(File::Spec::Unix) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(File::Spec::Functions) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(File::Spec) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Cwd) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: perl(Carp) for package: 4:perl-5.16.3-294.el7_6.x86_64
--> Processing Dependency: libperl.so()(64bit) for package: 4:perl-5.16.3-294.el7_6.x86_64
---> Package perl-DBD-MySQL.x86_64 0:4.023-6.el7 will be installed
---> Package perl-DBI.x86_64 0:1.627-4.el7 will be installed
--> Processing Dependency: perl(RPC::PlServer) >= 0.2001 for package: perl-DBI-1.627-4.el7.x86_64
--> Processing Dependency: perl(RPC::PlClient) >= 0.2000 for package: perl-DBI-1.627-4.el7.x86_64
---> Package perl-Data-Dumper.x86_64 0:2.145-3.el7 will be installed
---> Package perl-Exporter.noarch 0:5.68-3.el7 will be installed
---> Package perl-File-Path.noarch 0:2.09-2.el7 will be installed
---> Package perl-File-Temp.noarch 0:0.23.01-3.el7 will be installed
---> Package perl-Getopt-Long.noarch 0:2.40-3.el7 will be installed
--> Processing Dependency: perl(Pod::Usage) >= 1.14 for package: perl-Getopt-Long-2.40-3.el7.noarch
--> Processing Dependency: perl(Text::ParseWords) for package: perl-Getopt-Long-2.40-3.el7.noarch
--> Running transaction check
---> Package perl-Carp.noarch 0:1.26-244.el7 will be installed
---> Package perl-Filter.x86_64 0:1.49-3.el7 will be installed
---> Package perl-PathTools.x86_64 0:3.40-5.el7 will be installed
---> Package perl-PlRPC.noarch 0:0.2020-14.el7 will be installed
--> Processing Dependency: perl(Net::Daemon) >= 0.13 for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Test) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Net::Daemon::Log) for package: perl-PlRPC-0.2020-14.el7.noarch
--> Processing Dependency: perl(Compress::Zlib) for package: perl-PlRPC-0.2020-14.el7.noarch
---> Package perl-Pod-Simple.noarch 1:3.28-4.el7 will be installed
--> Processing Dependency: perl(Pod::Escapes) >= 1.04 for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
--> Processing Dependency: perl(Encode) for package: 1:perl-Pod-Simple-3.28-4.el7.noarch
---> Package perl-Pod-Usage.noarch 0:1.63-3.el7 will be installed
--> Processing Dependency: perl(Pod::Text) >= 3.15 for package: perl-Pod-Usage-1.63-3.el7.noarch
--> Processing Dependency: perl-Pod-Perldoc for package: perl-Pod-Usage-1.63-3.el7.noarch
---> Package perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 will be installed
---> Package perl-Socket.x86_64 0:2.010-4.el7 will be installed
---> Package perl-Storable.x86_64 0:2.45-3.el7 will be installed
---> Package perl-Text-ParseWords.noarch 0:3.29-4.el7 will be installed
---> Package perl-Time-HiRes.x86_64 4:1.9725-3.el7 will be installed
---> Package perl-Time-Local.noarch 0:1.2300-2.el7 will be installed
---> Package perl-constant.noarch 0:1.27-2.el7 will be installed
---> Package perl-libs.x86_64 4:5.16.3-294.el7_6 will be installed
---> Package perl-macros.x86_64 4:5.16.3-294.el7_6 will be installed
---> Package perl-threads.x86_64 0:1.87-4.el7 will be installed
---> Package perl-threads-shared.x86_64 0:1.43-6.el7 will be installed
--> Running transaction check
---> Package perl-Encode.x86_64 0:2.51-7.el7 will be installed
---> Package perl-IO-Compress.noarch 0:2.061-2.el7 will be installed
--> Processing Dependency: perl(Compress::Raw::Zlib) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
--> Processing Dependency: perl(Compress::Raw::Bzip2) >= 2.061 for package: perl-IO-Compress-2.061-2.el7.noarch
---> Package perl-Net-Daemon.noarch 0:0.48-5.el7 will be installed
---> Package perl-Pod-Escapes.noarch 1:1.04-294.el7_6 will be installed
---> Package perl-Pod-Perldoc.noarch 0:3.20-4.el7 will be installed
--> Processing Dependency: perl(parent) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
--> Processing Dependency: perl(HTTP::Tiny) for package: perl-Pod-Perldoc-3.20-4.el7.noarch
---> Package perl-podlators.noarch 0:2.5.1-3.el7 will be installed
--> Running transaction check
---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7 will be installed
---> Package perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7 will be installed
---> Package perl-HTTP-Tiny.noarch 0:0.033-3.el7 will be installed
---> Package perl-parent.noarch 1:0.225-244.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                     Arch       Version                  Repository
                                                                           Size
================================================================================
Installing:
 mariadb                     x86_64     1:5.5.64-1.el7           base     8.7 M
 mariadb-server              x86_64     1:5.5.64-1.el7           base      11 M
Installing for dependencies:
 perl                        x86_64     4:5.16.3-294.el7_6       base     8.0 M
 perl-Carp                   noarch     1.26-244.el7             base      19 k
 perl-Compress-Raw-Bzip2     x86_64     2.061-3.el7              base      32 k
 perl-Compress-Raw-Zlib      x86_64     1:2.061-4.el7            base      57 k
 perl-DBD-MySQL              x86_64     4.023-6.el7              base     140 k
 perl-DBI                    x86_64     1.627-4.el7              base     802 k
 perl-Data-Dumper            x86_64     2.145-3.el7              base      47 k
 perl-Encode                 x86_64     2.51-7.el7               base     1.5 M
 perl-Exporter               noarch     5.68-3.el7               base      28 k
 perl-File-Path              noarch     2.09-2.el7               base      26 k
 perl-File-Temp              noarch     0.23.01-3.el7            base      56 k
 perl-Filter                 x86_64     1.49-3.el7               base      76 k
 perl-Getopt-Long            noarch     2.40-3.el7               base      56 k
 perl-HTTP-Tiny              noarch     0.033-3.el7              base      38 k
 perl-IO-Compress            noarch     2.061-2.el7              base     260 k
 perl-Net-Daemon             noarch     0.48-5.el7               base      51 k
 perl-PathTools              x86_64     3.40-5.el7               base      82 k
 perl-PlRPC                  noarch     0.2020-14.el7            base      36 k
 perl-Pod-Escapes            noarch     1:1.04-294.el7_6         base      51 k
 perl-Pod-Perldoc            noarch     3.20-4.el7               base      87 k
 perl-Pod-Simple             noarch     1:3.28-4.el7             base     216 k
 perl-Pod-Usage              noarch     1.63-3.el7               base      27 k
 perl-Scalar-List-Utils      x86_64     1.27-248.el7             base      36 k
 perl-Socket                 x86_64     2.010-4.el7              base      49 k
 perl-Storable               x86_64     2.45-3.el7               base      77 k
 perl-Text-ParseWords        noarch     3.29-4.el7               base      14 k
 perl-Time-HiRes             x86_64     4:1.9725-3.el7           base      45 k
 perl-Time-Local             noarch     1.2300-2.el7             base      24 k
 perl-constant               noarch     1.27-2.el7               base      19 k
 perl-libs                   x86_64     4:5.16.3-294.el7_6       base     688 k
 perl-macros                 x86_64     4:5.16.3-294.el7_6       base      44 k
 perl-parent                 noarch     1:0.225-244.el7          base      12 k
 perl-podlators              noarch     2.5.1-3.el7              base     112 k
 perl-threads                x86_64     1.87-4.el7               base      49 k
 perl-threads-shared         x86_64     1.43-6.el7               base      39 k

Transaction Summary
================================================================================
Install  2 Packages (+35 Dependent packages)

Total download size: 33 M
Installed size: 147 M
Downloading packages:
(1/37): mariadb-5.5.64-1.el7.x86_64.rpm                    | 8.7 MB   00:17     
(2/37): mariadb-server-5.5.64-1.el7.x86_64.rpm             |  11 MB   00:19     
(3/37): perl-Carp-1.26-244.el7.noarch.rpm                  |  19 kB   00:00     
(4/37): perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64.rpm     |  32 kB   00:00     
(5/37): perl-Compress-Raw-Zlib-2.061-4.el7.x86_64.rpm      |  57 kB   00:00     
(6/37): perl-DBD-MySQL-4.023-6.el7.x86_64.rpm              | 140 kB   00:00     
(7/37): perl-5.16.3-294.el7_6.x86_64.rpm                   | 8.0 MB   00:02     
(8/37): perl-DBI-1.627-4.el7.x86_64.rpm                    | 802 kB   00:00     
(9/37): perl-Data-Dumper-2.145-3.el7.x86_64.rpm            |  47 kB   00:00     
(10/37): perl-Exporter-5.68-3.el7.noarch.rpm               |  28 kB   00:00     
(11/37): perl-File-Path-2.09-2.el7.noarch.rpm              |  26 kB   00:00     
(12/37): perl-File-Temp-0.23.01-3.el7.noarch.rpm           |  56 kB   00:00     
(13/37): perl-Filter-1.49-3.el7.x86_64.rpm                 |  76 kB   00:00     
(14/37): perl-Getopt-Long-2.40-3.el7.noarch.rpm            |  56 kB   00:00     
(15/37): perl-Encode-2.51-7.el7.x86_64.rpm                 | 1.5 MB   00:00     
(16/37): perl-HTTP-Tiny-0.033-3.el7.noarch.rpm             |  38 kB   00:00     
(17/37): perl-IO-Compress-2.061-2.el7.noarch.rpm           | 260 kB   00:00     
(18/37): perl-Net-Daemon-0.48-5.el7.noarch.rpm             |  51 kB   00:00     
(19/37): perl-PlRPC-0.2020-14.el7.noarch.rpm               |  36 kB   00:00     
(20/37): perl-PathTools-3.40-5.el7.x86_64.rpm              |  82 kB   00:00     
(21/37): perl-Pod-Escapes-1.04-294.el7_6.noarch.rpm        |  51 kB   00:00     
(22/37): perl-Pod-Perldoc-3.20-4.el7.noarch.rpm            |  87 kB   00:00     
(23/37): perl-Pod-Usage-1.63-3.el7.noarch.rpm              |  27 kB   00:00     
(24/37): perl-Pod-Simple-3.28-4.el7.noarch.rpm             | 216 kB   00:00     
(25/37): perl-Scalar-List-Utils-1.27-248.el7.x86_64.rpm    |  36 kB   00:00     
(26/37): perl-Socket-2.010-4.el7.x86_64.rpm                |  49 kB   00:00     
(27/37): perl-Storable-2.45-3.el7.x86_64.rpm               |  77 kB   00:00     
(28/37): perl-Text-ParseWords-3.29-4.el7.noarch.rpm        |  14 kB   00:00     
(29/37): perl-Time-HiRes-1.9725-3.el7.x86_64.rpm           |  45 kB   00:00     
(30/37): perl-Time-Local-1.2300-2.el7.noarch.rpm           |  24 kB   00:00     
(31/37): perl-constant-1.27-2.el7.noarch.rpm               |  19 kB   00:00     
(32/37): perl-macros-5.16.3-294.el7_6.x86_64.rpm           |  44 kB   00:00     
(33/37): perl-libs-5.16.3-294.el7_6.x86_64.rpm             | 688 kB   00:00     
(34/37): perl-parent-0.225-244.el7.noarch.rpm              |  12 kB   00:00     
(35/37): perl-podlators-2.5.1-3.el7.noarch.rpm             | 112 kB   00:00     
(36/37): perl-threads-1.87-4.el7.x86_64.rpm                |  49 kB   00:00     
(37/37): perl-threads-shared-1.43-6.el7.x86_64.rpm         |  39 kB   00:00     
--------------------------------------------------------------------------------
Total                                              1.6 MB/s |  33 MB  00:20     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : 1:perl-parent-0.225-244.el7.noarch                          1/37 
  Installing : perl-HTTP-Tiny-0.033-3.el7.noarch                           2/37 
  Installing : perl-podlators-2.5.1-3.el7.noarch                           3/37 
  Installing : perl-Pod-Perldoc-3.20-4.el7.noarch                          4/37 
  Installing : 1:perl-Pod-Escapes-1.04-294.el7_6.noarch                    5/37 
  Installing : perl-Encode-2.51-7.el7.x86_64                               6/37 
  Installing : perl-Text-ParseWords-3.29-4.el7.noarch                      7/37 
  Installing : perl-Pod-Usage-1.63-3.el7.noarch                            8/37 
  Installing : 4:perl-libs-5.16.3-294.el7_6.x86_64                         9/37 
  Installing : 4:perl-macros-5.16.3-294.el7_6.x86_64                      10/37 
  Installing : perl-Storable-2.45-3.el7.x86_64                            11/37 
  Installing : perl-Exporter-5.68-3.el7.noarch                            12/37 
  Installing : perl-constant-1.27-2.el7.noarch                            13/37 
  Installing : perl-Time-Local-1.2300-2.el7.noarch                        14/37 
  Installing : perl-Socket-2.010-4.el7.x86_64                             15/37 
  Installing : perl-Carp-1.26-244.el7.noarch                              16/37 
  Installing : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                      17/37 
  Installing : perl-PathTools-3.40-5.el7.x86_64                           18/37 
  Installing : perl-Scalar-List-Utils-1.27-248.el7.x86_64                 19/37 
  Installing : 1:perl-Pod-Simple-3.28-4.el7.noarch                        20/37 
  Installing : perl-File-Temp-0.23.01-3.el7.noarch                        21/37 
  Installing : perl-File-Path-2.09-2.el7.noarch                           22/37 
  Installing : perl-threads-shared-1.43-6.el7.x86_64                      23/37 
  Installing : perl-threads-1.87-4.el7.x86_64                             24/37 
  Installing : perl-Filter-1.49-3.el7.x86_64                              25/37 
  Installing : perl-Getopt-Long-2.40-3.el7.noarch                         26/37 
  Installing : 4:perl-5.16.3-294.el7_6.x86_64                             27/37 
  Installing : perl-Data-Dumper-2.145-3.el7.x86_64                        28/37 
  Installing : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                 29/37 
  Installing : perl-Net-Daemon-0.48-5.el7.noarch                          30/37 
  Installing : 1:mariadb-5.5.64-1.el7.x86_64                              31/37 
  Installing : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                32/37 
  Installing : perl-IO-Compress-2.061-2.el7.noarch                        33/37 
  Installing : perl-PlRPC-0.2020-14.el7.noarch                            34/37 
  Installing : perl-DBI-1.627-4.el7.x86_64                                35/37 
  Installing : perl-DBD-MySQL-4.023-6.el7.x86_64                          36/37 
  Installing : 1:mariadb-server-5.5.64-1.el7.x86_64                       37/37 
  Verifying  : perl-HTTP-Tiny-0.033-3.el7.noarch                           1/37 
  Verifying  : perl-threads-shared-1.43-6.el7.x86_64                       2/37 
  Verifying  : perl-Storable-2.45-3.el7.x86_64                             3/37 
  Verifying  : 1:perl-Pod-Escapes-1.04-294.el7_6.noarch                    4/37 
  Verifying  : perl-DBD-MySQL-4.023-6.el7.x86_64                           5/37 
  Verifying  : perl-Exporter-5.68-3.el7.noarch                             6/37 
  Verifying  : perl-constant-1.27-2.el7.noarch                             7/37 
  Verifying  : perl-PathTools-3.40-5.el7.x86_64                            8/37 
  Verifying  : perl-Compress-Raw-Bzip2-2.061-3.el7.x86_64                  9/37 
  Verifying  : 1:perl-parent-0.225-244.el7.noarch                         10/37 
  Verifying  : perl-Net-Daemon-0.48-5.el7.noarch                          11/37 
  Verifying  : 1:mariadb-5.5.64-1.el7.x86_64                              12/37 
  Verifying  : 4:perl-libs-5.16.3-294.el7_6.x86_64                        13/37 
  Verifying  : perl-File-Temp-0.23.01-3.el7.noarch                        14/37 
  Verifying  : 1:perl-Pod-Simple-3.28-4.el7.noarch                        15/37 
  Verifying  : perl-Time-Local-1.2300-2.el7.noarch                        16/37 
  Verifying  : perl-DBI-1.627-4.el7.x86_64                                17/37 
  Verifying  : 4:perl-macros-5.16.3-294.el7_6.x86_64                      18/37 
  Verifying  : perl-Socket-2.010-4.el7.x86_64                             19/37 
  Verifying  : perl-Carp-1.26-244.el7.noarch                              20/37 
  Verifying  : perl-Data-Dumper-2.145-3.el7.x86_64                        21/37 
  Verifying  : 4:perl-Time-HiRes-1.9725-3.el7.x86_64                      22/37 
  Verifying  : perl-Scalar-List-Utils-1.27-248.el7.x86_64                 23/37 
  Verifying  : 1:perl-Compress-Raw-Zlib-2.061-4.el7.x86_64                24/37 
  Verifying  : perl-IO-Compress-2.061-2.el7.noarch                        25/37 
  Verifying  : perl-Pod-Usage-1.63-3.el7.noarch                           26/37 
  Verifying  : perl-PlRPC-0.2020-14.el7.noarch                            27/37 
  Verifying  : perl-Encode-2.51-7.el7.x86_64                              28/37 
  Verifying  : perl-Pod-Perldoc-3.20-4.el7.noarch                         29/37 
  Verifying  : perl-podlators-2.5.1-3.el7.noarch                          30/37 
  Verifying  : perl-File-Path-2.09-2.el7.noarch                           31/37 
  Verifying  : perl-threads-1.87-4.el7.x86_64                             32/37 
  Verifying  : perl-Filter-1.49-3.el7.x86_64                              33/37 
  Verifying  : perl-Getopt-Long-2.40-3.el7.noarch                         34/37 
  Verifying  : perl-Text-ParseWords-3.29-4.el7.noarch                     35/37 
  Verifying  : 4:perl-5.16.3-294.el7_6.x86_64                             36/37 
  Verifying  : 1:mariadb-server-5.5.64-1.el7.x86_64                       37/37 

Installed:
  mariadb.x86_64 1:5.5.64-1.el7       mariadb-server.x86_64 1:5.5.64-1.el7      

Dependency Installed:
  perl.x86_64 4:5.16.3-294.el7_6                                                
  perl-Carp.noarch 0:1.26-244.el7                                               
  perl-Compress-Raw-Bzip2.x86_64 0:2.061-3.el7                                  
  perl-Compress-Raw-Zlib.x86_64 1:2.061-4.el7                                   
  perl-DBD-MySQL.x86_64 0:4.023-6.el7                                           
  perl-DBI.x86_64 0:1.627-4.el7                                                 
  perl-Data-Dumper.x86_64 0:2.145-3.el7                                         
  perl-Encode.x86_64 0:2.51-7.el7                                               
  perl-Exporter.noarch 0:5.68-3.el7                                             
  perl-File-Path.noarch 0:2.09-2.el7                                            
  perl-File-Temp.noarch 0:0.23.01-3.el7                                         
  perl-Filter.x86_64 0:1.49-3.el7                                               
  perl-Getopt-Long.noarch 0:2.40-3.el7                                          
  perl-HTTP-Tiny.noarch 0:0.033-3.el7                                           
  perl-IO-Compress.noarch 0:2.061-2.el7                                         
  perl-Net-Daemon.noarch 0:0.48-5.el7                                           
  perl-PathTools.x86_64 0:3.40-5.el7                                            
  perl-PlRPC.noarch 0:0.2020-14.el7                                             
  perl-Pod-Escapes.noarch 1:1.04-294.el7_6                                      
  perl-Pod-Perldoc.noarch 0:3.20-4.el7                                          
  perl-Pod-Simple.noarch 1:3.28-4.el7                                           
  perl-Pod-Usage.noarch 0:1.63-3.el7                                            
  perl-Scalar-List-Utils.x86_64 0:1.27-248.el7                                  
  perl-Socket.x86_64 0:2.010-4.el7                                              
  perl-Storable.x86_64 0:2.45-3.el7                                             
  perl-Text-ParseWords.noarch 0:3.29-4.el7                                      
  perl-Time-HiRes.x86_64 4:1.9725-3.el7                                         
  perl-Time-Local.noarch 0:1.2300-2.el7                                         
  perl-constant.noarch 0:1.27-2.el7                                             
  perl-libs.x86_64 4:5.16.3-294.el7_6                                           
  perl-macros.x86_64 4:5.16.3-294.el7_6                                         
  perl-parent.noarch 1:0.225-244.el7                                            
  perl-podlators.noarch 0:2.5.1-3.el7                                           
  perl-threads.x86_64 0:1.87-4.el7                                              
  perl-threads-shared.x86_64 0:1.43-6.el7                                       

Complete!

Verifying installed packages

If you like to see a list of the installed packages which names begins with “mariadb” you can execute the following CLI command.

yum list installed | grep ^mariadb
MariaDB packages

Start MariaDB service

systemctl start mariadb
Start MariaDB

As you can see in the preceding screenshot, the system doesn’t give you any feedback about the start of MariaDB, this is something quite common in Linux, in fact there is a very well know saying that goes “no news is good news”, anyway if you are like me, you always prefer to double check everything, and for that you can use the next CLI command.

Check MariaDB current status

systemctl status mariadb

If the installation went well you will get the following information when checking the current status.

Where it’s logging to?

One important thing to notice and why not to take note is where MariaDB is logging, in this case to the following folder:

Logging to '/var/log/mariadb/mariadb.log'
MariaDB Logging file

The first place to go when something is not working as it should with MariDB is the log file “mariadb.log”, fortunately the file’s name is self-explanatory and that is very helpful when troubleshooting MariaDB issues.

Configure MariaDB to start at boot

systemctl enable mariadb.service

Checking MariaDB installed version

mysql --version
Checking MariaDB version

Remote access and firewalld

If you are planning to access MariaDB remotely then you’ll have to add “mysql” into “firewalld” as an exception, you can use the following CLI commands to permanently add MariaDB service into the firewall.

[root@centos7 ~]# firewall-cmd --zone=public --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp0s3
  sources: 
  services: dhcpv6-client http ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 

[root@centos7 ~]# firewall-cmd --zone=public --permanent --add-service=mysql
success
[root@centos7 ~]# firewall-cmd --reload
success
[root@centos7 ~]# firewall-cmd --zone=public --list-all
public (active)
  target: default
  icmp-block-inversion: no
  interfaces: enp0s3
  sources: 
  services: dhcpv6-client http mysql ssh
  ports: 
  protocols: 
  masquerade: no
  forward-ports: 
  source-ports: 
  icmp-blocks: 
  rich rules: 


Firewalld list of services

In case you want to see a complete list of the available services that can be added into the firewall you can execute the following CLI command.

firewall-cmd --get-services | grep mysql
Firewall services list

MySQL protocol TCP, port 3306

Let’s use WinSCP to open the XML file that contains all the information related to MySQL service.

/usr/lib/firewalld/services

It is a good idea to bookmark this folder on WinSCP, if don’t know how to do that you can take a look at this article.

MySQL service – Protocol TCP – port 3306

Where to go next?

We’ve successfully installed MariaDB, added it to the firewall, and we also verified MariaDB (mysql) protocol(TCP) and port(3306), the next step is to secure MariaDB a process that will allow us to not only secure the installation but also to set the “root” account password, you can take a look at the following article.