===Overview=== MariaDB is fork version of MySQL :) So you can think of it, as a different MySQL with better support and features. In this page,we will explore the latest Maria DB: 10.3, since it can fully replace Oracle (wink wink, we are totally doing that later :) ). ===Configure Repository=== There are couple ways to install and configure MariaDB, but we will use the basic yum, so let's set our repository for Centos (linux 6.8) According the "complicated" MariaDB page it should look something like this: [mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.3/centos6-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 After that, the installation is quite easy as any MySQL / PostgreSQL database: ===Installation=== Just start the YUM :) [root@**************** yum.repos.d]# yum install MariaDB-server MariaDB-client Loaded plugins: fastestmirror Setting up Install Process Determining fastest mirrors * base: anorien.csc.warwick.ac.uk * extras: anorien.csc.warwick.ac.uk * updates: centos.mirrors.nublue.co.uk base | 3.7 kB 00:00 base/primary_db | 4.7 MB 00:01 extras | 3.4 kB 00:00 extras/primary_db | 28 kB 00:00 mariadb | 2.9 kB 00:00 mariadb/primary_db | 47 kB 00:00 updates | 3.4 kB 00:00 updates/primary_db | 3.2 MB 00:03 Resolving Dependencies --> Running transaction check ---> Package MariaDB-client.x86_64 0:10.3.13-1.el6 will be installed --> Processing Dependency: MariaDB-common for package: MariaDB-client-10.3.13-1.el6.x86_64 ---> Package MariaDB-server.x86_64 0:10.3.13-1.el6 will be installed --> Processing Dependency: perl(DBI) for package: MariaDB-server-10.3.13-1.el6.x86_64 --> Processing Dependency: lsof for package: MariaDB-server-10.3.13-1.el6.x86_64 --> Processing Dependency: galera for package: MariaDB-server-10.3.13-1.el6.x86_64 --> Running transaction check ---> Package MariaDB-common.x86_64 0:10.3.13-1.el6 will be installed --> Processing Dependency: MariaDB-compat for package: MariaDB-common-10.3.13-1.el6.x86_64 ---> Package galera.x86_64 0:25.3.25-1.rhel6.el6 will be installed --> Processing Dependency: libboost_program_options.so.5()(64bit) for package: galera-25.3.25-1.rhel6.el6.x86_64 ---> Package lsof.x86_64 0:4.82-5.el6 will be installed ---> Package perl-DBI.x86_64 0:1.609-4.el6 will be installed --> Running transaction check ---> Package MariaDB-compat.x86_64 0:10.3.13-1.el6 will be obsoleting ---> Package boost-program-options.x86_64 0:1.41.0-28.el6 will be installed ---> Package mysql-libs.x86_64 0:5.1.73-8.el6_8 will be obsoleted --> Finished Dependency Resolution Dependencies Resolved ================================================================================================================================================================================================ Package Arch Version Repository Size ================================================================================================================================================================================================ Installing: MariaDB-client x86_64 10.3.13-1.el6 mariadb 53 M MariaDB-compat x86_64 10.3.13-1.el6 mariadb 4.0 M replacing mysql-libs.x86_64 5.1.73-8.el6_8 MariaDB-server x86_64 10.3.13-1.el6 mariadb 122 M Installing for dependencies: MariaDB-common x86_64 10.3.13-1.el6 mariadb 163 k boost-program-options x86_64 1.41.0-28.el6 base 108 k galera x86_64 25.3.25-1.rhel6.el6 mariadb 8.8 M lsof x86_64 4.82-5.el6 base 324 k perl-DBI x86_64 1.609-4.el6 base 705 k Transaction Summary ================================================================================================================================================================================================ Install 8 Package(s) Total download size: 190 M Is this ok [y/N]: y Downloading Packages: (1/8): MariaDB-10.3.13-centos6-x86_64-client.rpm | 53 MB 00:30 (2/8): MariaDB-10.3.13-centos6-x86_64-common.rpm | 163 kB 00:00 (3/8): MariaDB-10.3.13-centos6-x86_64-compat.rpm | 4.0 MB 00:01 (4/8): MariaDB-10.3.13-centos6-x86_64-server.rpm | 122 MB 00:38 (5/8): boost-program-options-1.41.0-28.el6.x86_64.rpm | 108 kB 00:00 (6/8): galera-25.3.25-1.rhel6.el6.x86_64.rpm | 8.8 MB 00:03 (7/8): lsof-4.82-5.el6.x86_64.rpm | 324 kB 00:00 (8/8): perl-DBI-1.609-4.el6.x86_64.rpm | 705 kB 00:00 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Total 2.5 MB/s | 190 MB 01:16 warning: rpmts_HdrFromFdno: Header V4 DSA/SHA1 Signature, key ID 1bb943db: NOKEY Retrieving key from https://yum.mariadb.org/RPM-GPG-KEY-MariaDB Importing GPG key 0x1BB943DB: Userid: "MariaDB Package Signing Key " From : https://yum.mariadb.org/RPM-GPG-KEY-MariaDB Is this ok [y/N]: y Running rpm_check_debug Running Transaction Test Transaction Test Succeeded Running Transaction Installing : MariaDB-common-10.3.13-1.el6.x86_64 1/9 Installing : MariaDB-compat-10.3.13-1.el6.x86_64 2/9 Installing : MariaDB-client-10.3.13-1.el6.x86_64 3/9 Installing : boost-program-options-1.41.0-28.el6.x86_64 4/9 Installing : galera-25.3.25-1.rhel6.el6.x86_64 5/9 Installing : perl-DBI-1.609-4.el6.x86_64 6/9 Installing : lsof-4.82-5.el6.x86_64 7/9 Installing : MariaDB-server-10.3.13-1.el6.x86_64 8/9 chown: cannot access `/var/lib/mysql': No such file or directory PLEASE REMEMBER TO SET A PASSWORD FOR THE MariaDB root USER ! To do so, start the server, then issue the following commands: '/usr/bin/mysqladmin' -u root password 'new-password' '/usr/bin/mysqladmin' -u root -h ag-se-tlcasdb2.net.tain.com password 'new-password' Alternatively you can run: '/usr/bin/mysql_secure_installation' which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the MariaDB Knowledgebase at http://mariadb.com/kb or the MySQL manual for more instructions. Please report any problems at http://mariadb.org/jira The latest information about MariaDB is available at http://mariadb.org/. You can find additional information about the MySQL part at: http://dev.mysql.com Consider joining MariaDB's strong and vibrant community: https://mariadb.org/get-involved/ Erasing : mysql-libs-5.1.73-8.el6_8.x86_64 9/9 Verifying : lsof-4.82-5.el6.x86_64 1/9 Verifying : MariaDB-compat-10.3.13-1.el6.x86_64 2/9 Verifying : MariaDB-client-10.3.13-1.el6.x86_64 3/9 Verifying : perl-DBI-1.609-4.el6.x86_64 4/9 Verifying : MariaDB-server-10.3.13-1.el6.x86_64 5/9 Verifying : MariaDB-common-10.3.13-1.el6.x86_64 6/9 Verifying : galera-25.3.25-1.rhel6.el6.x86_64 7/9 Verifying : boost-program-options-1.41.0-28.el6.x86_64 8/9 Verifying : mysql-libs-5.1.73-8.el6_8.x86_64 9/9 Installed: MariaDB-client.x86_64 0:10.3.13-1.el6 MariaDB-compat.x86_64 0:10.3.13-1.el6 MariaDB-server.x86_64 0:10.3.13-1.el6 Dependency Installed: MariaDB-common.x86_64 0:10.3.13-1.el6 boost-program-options.x86_64 0:1.41.0-28.el6 galera.x86_64 0:25.3.25-1.rhel6.el6 lsof.x86_64 0:4.82-5.el6 perl-DBI.x86_64 0:1.609-4.el6 Replaced: mysql-libs.x86_64 0:5.1.73-8.el6_8 Complete! ===Start/Stop MariaDB=== Starting and stopping MariaDB is done via the MySQL service as follows: [root@****************** yum.repos.d]# service mysql start Starting MariaDB.190315 16:52:54 mysqld_safe Logging to '/var/lib/mysql/ag-se-tlcasdb2.net.tain.com.err'. 190315 16:52:54 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql SUCCESS! This command, will start you the Maria DB (or won't if you have problems :) ). After that connection to the DB is done easily: [root@ag-se-tlcasdb2 yum.repos.d]# mysql -uroot Welcome to the MariaDB monitor. Commands end with ; or \g. Your MariaDB connection id is 9 Server version: 10.3.13-MariaDB MariaDB Server Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [(none)]>